numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to solve linear equations with total variation (TV) regularization using the alternating direction method of multipliers (ADMM) [2]. More...
#include <num_collect/regularization/tv_admm.h>
Public Types | |
using | base_type = iterative_regularized_solver_base<this_type, Data> |
Type of the base class. | |
using | coeff_type = Coeff |
Type of coefficient matrices. | |
using | derivative_matrix_type = DerivativeMatrix |
Type of matrices to compute derivatives. | |
using | this_type = tv_admm<Coeff, DerivativeMatrix, Data> |
This type. | |
Public Types inherited from num_collect::regularization::regularized_solver_base< tv_admm< Coeff, DerivativeMatrix, Data >, Data > | |
using | data_type |
Type of data. | |
using | scalar_type |
Type of scalars. | |
Public Member Functions | |
tv_admm () | |
Constructor. | |
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. | |
void | compute (const Coeff &coeff, const DerivativeMatrix &derivative_matrix, const Data &data) |
Compute internal parameters. | |
void | configure_iteration_logger (logging::iterations::iteration_logger< this_type > &iteration_logger) const |
Configure an iteration logger. | |
auto | data_size () const -> index_type |
Get the size of data. | |
void | init (const scalar_type ¶m, 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 ¶m, data_type &solution) |
Iterate the algorithm once. | |
auto | iterations () const noexcept -> index_type |
Get the number of iterations. | |
auto | max_iterations () const -> index_type |
Get the maximum number of iterations. | |
auto | max_iterations (index_type value) -> tv_admm & |
Set the maximum number of iterations. | |
auto | param_search_region () const -> std::pair< scalar_type, scalar_type > |
Get the default region to search for the optimal regularization parameter. | |
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. | |
auto | residual_norm_rate () const -> scalar_type |
Get the rate of the last residual norm. | |
auto | tol_update_rate () const -> scalar_type |
Get the tolerance of update rate of the solution. | |
auto | tol_update_rate (scalar_type value) -> tv_admm & |
Set the tolerance of update rate of the solution. | |
auto | update_rate () const noexcept -> scalar_type |
Get the rate of the norm of the update of the solution in the last iteration. | |
Public Member Functions inherited from num_collect::regularization::iterative_regularized_solver_base< tv_admm< Coeff, DerivativeMatrix, Data >, Data > | |
void | init (const scalar_type ¶m, 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 ¶m, data_type &solution) |
Iterate the algorithm once. | |
void | solve (const scalar_type ¶m, data_type &solution) |
Solve for a regularization parameter. | |
Public Member Functions inherited from num_collect::regularization::implicit_regularized_solver_base< tv_admm< Coeff, DerivativeMatrix, Data >, 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< tv_admm< Coeff, DerivativeMatrix, Data >, 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 ¶m, 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< tv_admm< Coeff, DerivativeMatrix, Data > > | |
iteration_logger_mixin ()=default | |
Constructor. | |
void | configure_iteration_logger (num_collect::logging::iterations::iteration_logger< tv_admm< Coeff, DerivativeMatrix, Data > > &iteration_logger) const |
Configure an iteration logger. | |
auto | initialize_iteration_logger () -> num_collect::logging::iterations::iteration_logger< tv_admm< Coeff, DerivativeMatrix, Data > > & |
Get the iteration logger. | |
Private Attributes | |
const coeff_type * | coeff_ {nullptr} |
Coefficient matrix to compute data vector. | |
linear::impl::operator_conjugate_gradient< data_type > | conjugate_gradient_ {} |
Conjugate gradient solver. | |
const data_type * | data_ {nullptr} |
Data vector. | |
data_type | derivative_ {} |
Derivative. | |
scalar_type | derivative_constraint_coeff_ |
Coefficient of the constraint for the derivative. | |
const derivative_matrix_type * | derivative_matrix_ {nullptr} |
Matrix to compute derivative. | |
index_type | iterations_ {} |
Number of iterations. | |
data_type | lagrange_multiplier_ {} |
Lagrange multiplier. | |
data_type | lagrange_multiplier_update_ {} |
Update of lagrange multiplier. | |
index_type | max_iterations_ {default_max_iterations} |
Maximum number of iterations. | |
data_type | previous_derivative_ {} |
Previous derivative. | |
data_type | previous_solution_ {} |
Previous solution. | |
scalar_type | rate_of_cg_tol_rate_to_tol_update_rate_ |
Rate of the ratio of the rate of tolerance in CG method to the tolerance of update rate of the solution. | |
data_type | residual_ {} |
Residual vector. | |
data_type | temp_solution_ {} |
Temporary vector for the update of the solution. | |
scalar_type | tol_update_rate_ {default_tol_update_rate} |
Tolerance of update rate of the solution. | |
scalar_type | update_rate_ {} |
Rate of norm of the update of the solution in the last iteration. | |
Static Private Attributes | |
static constexpr auto | default_derivative_constraint_coeff |
Default coefficient of the constraint for the derivative. | |
static constexpr index_type | default_max_iterations = 1000 |
Default maximum number of iterations. | |
static constexpr auto | default_rate_of_cg_tol_rate_to_tol_update_rate |
Default value of the ratio of the rate of tolerance in CG method to the tolerance of update rate of the solution. | |
static constexpr auto | default_tol_update_rate |
Default tolerance of update rate of the solution. | |
Additional Inherited Members | |
Protected Member Functions inherited from num_collect::regularization::iterative_regularized_solver_base< tv_admm< Coeff, DerivativeMatrix, Data >, Data > | |
iterative_regularized_solver_base (logging::log_tag_view tag) | |
Constructor. | |
Protected Member Functions inherited from num_collect::regularization::implicit_regularized_solver_base< tv_admm< Coeff, DerivativeMatrix, Data >, Data > | |
implicit_regularized_solver_base (logging::log_tag_view tag) | |
Constructor. | |
auto | derived () const noexcept -> const tv_admm< Coeff, DerivativeMatrix, Data > & |
Access derived object. | |
auto | derived () noexcept -> tv_admm< Coeff, DerivativeMatrix, Data > & |
Access derived object. | |
Protected Member Functions inherited from num_collect::regularization::regularized_solver_base< tv_admm< Coeff, DerivativeMatrix, Data >, Data > | |
regularized_solver_base (logging::log_tag_view tag) | |
Constructor. | |
auto | derived () const noexcept -> const tv_admm< Coeff, DerivativeMatrix, Data > & |
Access derived object. | |
auto | derived () noexcept -> tv_admm< Coeff, DerivativeMatrix, Data > & |
Access derived object. | |
Class to solve linear equations with total variation (TV) regularization using the alternating direction method of multipliers (ADMM) [2].
Coeff | Type of coefficient matrices. |
DerivativeMatrix | Type of matrices to compute derivatives. |
Data | Type of data vectors. |
using num_collect::regularization::tv_admm< Coeff, DerivativeMatrix, Data >::base_type = iterative_regularized_solver_base<this_type, Data> |
using num_collect::regularization::tv_admm< Coeff, DerivativeMatrix, Data >::coeff_type = Coeff |
using num_collect::regularization::tv_admm< Coeff, DerivativeMatrix, Data >::derivative_matrix_type = DerivativeMatrix |
using num_collect::regularization::tv_admm< Coeff, DerivativeMatrix, Data >::this_type = tv_admm<Coeff, DerivativeMatrix, Data> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenodiscard |
|
inline |
|
inlinenodiscard |
|
inline |
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
|
inline |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
|
inlinenodiscardnoexcept |
|
private |
|
private |
|
private |
|
staticconstexprprivate |
Default coefficient of the constraint for the derivative.
|
staticconstexprprivate |
|
staticconstexprprivate |
Default value of the ratio of the rate of tolerance in CG method to the tolerance of update rate of the solution.
|
staticconstexprprivate |
Default tolerance of update rate of the solution.
|
private |
|
private |
Coefficient of the constraint for the derivative.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Rate of the ratio of the rate of tolerance in CG method to the tolerance of update rate of the solution.
|
private |
|
private |
|
private |
|
private |