numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::opt::optimizer_base< Derived > Class Template Reference

Base class of implementations of optimization algorithms. More...

#include <num_collect/opt/optimizer_base.h>

Inheritance diagram for num_collect::opt::optimizer_base< Derived >:
Collaboration diagram for num_collect::opt::optimizer_base< Derived >:

Public Member Functions

 optimizer_base (logging::log_tag_view tag)
 Constructor.
auto evaluations () const noexcept -> index_type
 Get the number of function evaluations.
auto iterations () const noexcept -> index_type
 Get the number of iterations.
auto opt_value () const
 Get current optimal value.
auto opt_variable () const
 Get current optimal variable.
Public Member Functions inherited from num_collect::base::iterative_solver_base< Derived >
 iterative_solver_base (logging::log_tag_view tag)
 Constructor.
auto is_stop_criteria_satisfied () const -> bool
 Determine if stopping criteria of the algorithm are satisfied.
void iterate ()
 Iterate the algorithm once.
void solve ()
 Solve the problem.
Public Member Functions inherited from num_collect::logging::logging_mixin
 logging_mixin (log_tag_view tag)
 Constructor.
template<typename Child>
void configure_child_algorithm_logger_if_exists (Child &child)
 Configure a logger of a child algorithm if exists.
auto logger () const noexcept -> const num_collect::logging::logger &
 Access to the logger.
auto logger () noexcept -> num_collect::logging::logger &
 Access to the logger.
Public Member Functions inherited from num_collect::logging::iterations::iteration_logger_mixin< Derived >
 iteration_logger_mixin ()=default
 Constructor.
void configure_iteration_logger (num_collect::logging::iterations::iteration_logger< Derived > &iteration_logger) const
 Configure an iteration logger.
auto initialize_iteration_logger () -> num_collect::logging::iterations::iteration_logger< Derived > &
 Get the iteration logger.

Additional Inherited Members

Protected Member Functions inherited from num_collect::base::iterative_solver_base< Derived >
auto derived () const noexcept -> const Derived &
 Access derived object.
auto derived () noexcept -> Derived &
 Access derived object.

Detailed Description

template<typename Derived>
class num_collect::opt::optimizer_base< Derived >

Base class of implementations of optimization algorithms.

Template Parameters
DerivedType of derived class.

Definition at line 34 of file optimizer_base.h.

Constructor & Destructor Documentation

◆ optimizer_base()

template<typename Derived>
num_collect::opt::optimizer_base< Derived >::optimizer_base ( logging::log_tag_view tag)
inlineexplicit

Constructor.

Parameters
[in]tagLog tag.

Definition at line 45 of file optimizer_base.h.

Member Function Documentation

◆ evaluations()

template<typename Derived>
auto num_collect::opt::optimizer_base< Derived >::evaluations ( ) const -> index_type
inlinenodiscardnoexcept

Get the number of function evaluations.

Returns
Number of function evaluations.

Definition at line 76 of file optimizer_base.h.

◆ iterations()

template<typename Derived>
auto num_collect::opt::optimizer_base< Derived >::iterations ( ) const -> index_type
inlinenodiscardnoexcept

Get the number of iterations.

Returns
Number of iterations.

Definition at line 67 of file optimizer_base.h.

◆ opt_value()

template<typename Derived>
auto num_collect::opt::optimizer_base< Derived >::opt_value ( ) const
inlinenodiscard

Get current optimal value.

Returns
Current optimal value.

Definition at line 60 of file optimizer_base.h.

◆ opt_variable()

template<typename Derived>
auto num_collect::opt::optimizer_base< Derived >::opt_variable ( ) const
inlinenodiscard

Get current optimal variable.

Returns
Current optimal variable.

Definition at line 53 of file optimizer_base.h.


The documentation for this class was generated from the following file: