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

Base class of solvers using iterative formulas for regularization. More...

#include <num_collect/regularization/iterative_regularized_solver_base.h>

+ Inheritance diagram for num_collect::regularization::iterative_regularized_solver_base< Derived, Data >:
+ Collaboration diagram for num_collect::regularization::iterative_regularized_solver_base< Derived, Data >:

Public Member Functions

void init (const scalar_type &param, data_type &solution)
 Initialize.
 
auto is_stop_criteria_satisfied (const data_type &solution) const -> bool
 Determine if stopping criteria of the algorithm are satisfied.
 
void iterate (const scalar_type &param, data_type &solution)
 Iterate the algorithm once.
 
void solve (const scalar_type &param, data_type &solution)
 Solve for a regularization parameter.
 
- Public Member Functions inherited from num_collect::regularization::implicit_regularized_solver_base< Derived, Data >
void calculate_data_for (const data_type &solution, data_type &data) const
 Calculate data for a solution.
 
void change_data (const data_type &data)
 Change data.
 
auto regularization_term (const data_type &solution) const -> scalar_type
 Calculate the regularization term.
 
auto residual_norm (const data_type &solution) const -> scalar_type
 Calculate the squared norm of the residual.
 
- Public Member Functions inherited from num_collect::regularization::regularized_solver_base< Derived, Data >
auto data_size () const -> index_type
 Get the size of data.
 
auto param_search_region () const -> std::pair< scalar_type, scalar_type >
 Get the default region to search for the optimal regularization parameter.
 
void solve (const scalar_type &param, data_type &solution)
 Solve for a regularization parameter.
 
- 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.
 

Protected Member Functions

 iterative_regularized_solver_base (logging::log_tag_view tag)
 Constructor.
 
- Protected Member Functions inherited from num_collect::regularization::implicit_regularized_solver_base< Derived, Data >
 implicit_regularized_solver_base (logging::log_tag_view tag)
 Constructor.
 
auto derived () const noexcept -> const Derived &
 Access derived object.
 
auto derived () noexcept -> Derived &
 Access derived object.
 
- Protected Member Functions inherited from num_collect::regularization::regularized_solver_base< Derived, Data >
 regularized_solver_base (logging::log_tag_view tag)
 Constructor.
 
auto derived () const noexcept -> const Derived &
 Access derived object.
 
auto derived () noexcept -> Derived &
 Access derived object.
 

Additional Inherited Members

- Public Types inherited from num_collect::regularization::regularized_solver_base< Derived, Data >
using data_type = Data
 Type of data.
 
using scalar_type
 Type of scalars.
 

Detailed Description

template<typename Derived, base::concepts::dense_matrix Data>
class num_collect::regularization::iterative_regularized_solver_base< Derived, Data >

Base class of solvers using iterative formulas for regularization.

Template Parameters
DerivedType of derived class.
DataType of data.

Definition at line 36 of file iterative_regularized_solver_base.h.

Constructor & Destructor Documentation

◆ iterative_regularized_solver_base()

template<typename Derived , base::concepts::dense_matrix Data>
num_collect::regularization::iterative_regularized_solver_base< Derived, Data >::iterative_regularized_solver_base ( logging::log_tag_view tag)
inlineexplicitprotected

Constructor.

Parameters
[in]tagLog tag.

Definition at line 116 of file iterative_regularized_solver_base.h.

Member Function Documentation

◆ init()

template<typename Derived , base::concepts::dense_matrix Data>
void num_collect::regularization::iterative_regularized_solver_base< Derived, Data >::init ( const scalar_type & param,
data_type & solution )
inline

Initialize.

Parameters
[in]paramRegularization parameter.
[in,out]solutionSolution. (Assumed to be the initial solution.)
Warning
Any required initializations (with compute functions) are assumed to have been done.

Definition at line 57 of file iterative_regularized_solver_base.h.

◆ is_stop_criteria_satisfied()

template<typename Derived , base::concepts::dense_matrix Data>
auto num_collect::regularization::iterative_regularized_solver_base< Derived, Data >::is_stop_criteria_satisfied ( const data_type & solution) const -> bool
inlinenodiscard

Determine if stopping criteria of the algorithm are satisfied.

Parameters
[in]solutionSolution.
Returns
If stopping criteria of the algorithm are satisfied.

Definition at line 80 of file iterative_regularized_solver_base.h.

◆ iterate()

template<typename Derived , base::concepts::dense_matrix Data>
void num_collect::regularization::iterative_regularized_solver_base< Derived, Data >::iterate ( const scalar_type & param,
data_type & solution )
inline

Iterate the algorithm once.

Parameters
[in]paramRegularization parameter.
[in,out]solutionSolution. (Assumed to be the last solution.)
Warning
Any required initializations (with init functions) are assumed to have been done.

Definition at line 70 of file iterative_regularized_solver_base.h.

◆ solve()

template<typename Derived , base::concepts::dense_matrix Data>
void num_collect::regularization::iterative_regularized_solver_base< Derived, Data >::solve ( const scalar_type & param,
data_type & solution )
inline

Solve for a regularization parameter.

Parameters
[in]paramRegularization parameter.
[in,out]solutionSolution. (Assumed to be the initial solution.)
Warning
Any required initializations (with compute functions) are assumed to have been done.

Definition at line 94 of file iterative_regularized_solver_base.h.


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