numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to calculate the objective function of GCV. More...
#include <num_collect/regularization/implicit_gcv.h>
Public Types | |
using | data_type = typename solver_type::data_type |
Type of data. | |
using | scalar_type = typename solver_type::scalar_type |
Type of scalars. | |
using | solver_type = Solver |
Type of solvers. | |
Public Member Functions | |
implicit_gcv_calculator (solver_type &solver, const data_type &data, const data_type &initial_solution) | |
Constructor. | |
void | generate_noise () |
Generate noise with a random seed. | |
template<base::concepts::invocable<> RandomNumberGenerator> | |
void | generate_noise (RandomNumberGenerator &generator) |
Generate noise to use in calculation. | |
auto | noise_rate (scalar_type value) -> implicit_gcv_calculator & |
Set the rate of noise. | |
auto | num_samples (index_type value) -> implicit_gcv_calculator & |
Set the number of samples for approximation of denominator of GCV. | |
auto | operator() (scalar_type param) -> scalar_type |
Calculate GCV function. | |
auto | solver () const noexcept -> solver_type & |
Get the solver. | |
Private Attributes | |
const data_type * | data_ |
Actual data. | |
util::vector< data_type > | data_with_noise_ {} |
Data with noise. | |
data_type | forwarded_data_ {} |
Buffer of data generated from the solution. | |
data_type | forwarded_data_with_noise_ {} |
Buffer of data generated from the solution with noise. | |
const data_type * | initial_solution_ |
Initial solution. | |
util::vector< data_type > | noise_ |
Vector of noise. | |
scalar_type | noise_multiplier_ {} |
Multiplier of noise. | |
scalar_type | noise_rate_ {default_noise_rate} |
Rate of noise. | |
data_type | solution_ {} |
Buffer of the solution. | |
data_type | solution_with_noise_ {} |
Buffer of the solution with noise. | |
solver_type * | solver_ |
Solver. | |
Static Private Attributes | |
static constexpr scalar_type | default_noise_rate = 1e-2 |
Default rate of noise. | |
Class to calculate the objective function of GCV.
Solver | Type of solvers. |
Definition at line 50 of file implicit_gcv.h.
using num_collect::regularization::implicit_gcv_calculator< Solver >::data_type = typename solver_type::data_type |
Type of data.
Definition at line 59 of file implicit_gcv.h.
using num_collect::regularization::implicit_gcv_calculator< Solver >::scalar_type = typename solver_type::scalar_type |
Type of scalars.
Definition at line 56 of file implicit_gcv.h.
using num_collect::regularization::implicit_gcv_calculator< Solver >::solver_type = Solver |
Type of solvers.
Definition at line 53 of file implicit_gcv.h.
|
inline |
Constructor.
[in] | solver | Solver. |
[in] | data | Data. |
[in] | initial_solution | Initial solution. |
Definition at line 71 of file implicit_gcv.h.
|
inline |
Generate noise with a random seed.
Definition at line 169 of file implicit_gcv.h.
|
inline |
Generate noise to use in calculation.
RandomNumberGenerator | Type of the generator of random numbers. |
[in] | generator | Generator of random numbers. |
Definition at line 155 of file implicit_gcv.h.
|
inline |
Set the rate of noise.
[in] | value | Value. |
Definition at line 124 of file implicit_gcv.h.
|
inline |
Set the number of samples for approximation of denominator of GCV.
[in] | value | Value. |
Definition at line 140 of file implicit_gcv.h.
|
inlinenodiscard |
Calculate GCV function.
[in] | param | Regularization parameter. |
Definition at line 84 of file implicit_gcv.h.
|
inlinenodiscardnoexcept |
|
private |
Actual data.
Definition at line 188 of file implicit_gcv.h.
|
private |
Data with noise.
Definition at line 203 of file implicit_gcv.h.
|
staticconstexprprivate |
Default rate of noise.
Definition at line 194 of file implicit_gcv.h.
|
private |
Buffer of data generated from the solution.
Definition at line 215 of file implicit_gcv.h.
|
private |
Buffer of data generated from the solution with noise.
Definition at line 218 of file implicit_gcv.h.
|
private |
Initial solution.
Definition at line 206 of file implicit_gcv.h.
|
private |
Vector of noise.
Definition at line 191 of file implicit_gcv.h.
|
private |
Multiplier of noise.
Definition at line 200 of file implicit_gcv.h.
|
private |
Rate of noise.
Definition at line 197 of file implicit_gcv.h.
|
private |
Buffer of the solution.
Definition at line 209 of file implicit_gcv.h.
|
private |
Buffer of the solution with noise.
Definition at line 212 of file implicit_gcv.h.
|
private |
Solver.
Definition at line 185 of file implicit_gcv.h.