numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_prob_collect::opt::random_multi_quadratic_function Class Reference

Class of multi-variate quadratic functions with random coefficients and optimal variables. More...

#include <num_prob_collect/opt/random_multi_quadratic_function.h>

+ Collaboration diagram for num_prob_collect::opt::random_multi_quadratic_function:

Public Types

using hessian_type = Eigen::MatrixXd
 Type of Hessian.
 
using value_type = double
 Type of function values.
 
using variable_type = Eigen::VectorXd
 Type of variables.
 

Public Member Functions

 random_multi_quadratic_function (Eigen::VectorXd optimal_variable, Eigen::VectorXd coefficients)
 Constructor.
 
auto coefficients () const noexcept -> const Eigen::VectorXd &
 Get the coefficients.
 
void evaluate_on (const Eigen::VectorXd &variable) noexcept
 Evaluate function value on variable.
 
auto gradient () const noexcept -> const Eigen::VectorXd &
 Get gradient.
 
auto hessian () const noexcept -> const Eigen::MatrixXd &
 Get Hessian.
 
auto optimal_variable () const noexcept -> const Eigen::VectorXd &
 Get the optimal variable.
 
auto value () const noexcept -> const double &
 Get function value.
 

Private Attributes

Eigen::VectorXd coefficients_
 Coefficients.
 
Eigen::VectorXd diff_ {}
 Buffer of difference.
 
Eigen::VectorXd grad_ {}
 Gradient.
 
Eigen::MatrixXd hessian_ {}
 Hessian.
 
Eigen::VectorXd optimal_variable_
 Optimal variable.
 
double value_ {0.0}
 Function value.
 

Detailed Description

Class of multi-variate quadratic functions with random coefficients and optimal variables.

Definition at line 34 of file random_multi_quadratic_function.h.

Member Typedef Documentation

◆ hessian_type

Type of Hessian.

Definition at line 41 of file random_multi_quadratic_function.h.

◆ value_type

Type of function values.

Definition at line 39 of file random_multi_quadratic_function.h.

◆ variable_type

Type of variables.

Definition at line 37 of file random_multi_quadratic_function.h.

Constructor & Destructor Documentation

◆ random_multi_quadratic_function()

num_prob_collect::opt::random_multi_quadratic_function::random_multi_quadratic_function ( Eigen::VectorXd optimal_variable,
Eigen::VectorXd coefficients )
inline

Constructor.

Parameters
[in]optimal_variableOptimal variable.
[in]coefficientsCoefficients.

Definition at line 49 of file random_multi_quadratic_function.h.

Member Function Documentation

◆ coefficients()

auto num_prob_collect::opt::random_multi_quadratic_function::coefficients ( ) const -> const Eigen::VectorXd&
inlinenodiscardnoexcept

Get the coefficients.

Returns
Coefficients.

Definition at line 111 of file random_multi_quadratic_function.h.

◆ evaluate_on()

void num_prob_collect::opt::random_multi_quadratic_function::evaluate_on ( const Eigen::VectorXd & variable)
inlinenoexcept

Evaluate function value on variable.

Parameters
[in]variableVariable.

Definition at line 62 of file random_multi_quadratic_function.h.

◆ gradient()

auto num_prob_collect::opt::random_multi_quadratic_function::gradient ( ) const -> const Eigen::VectorXd&
inlinenodiscardnoexcept

Get gradient.

Returns
Gradient.

Definition at line 83 of file random_multi_quadratic_function.h.

◆ hessian()

auto num_prob_collect::opt::random_multi_quadratic_function::hessian ( ) const -> const Eigen::MatrixXd&
inlinenodiscardnoexcept

Get Hessian.

Returns
Hessian.

Definition at line 92 of file random_multi_quadratic_function.h.

◆ optimal_variable()

auto num_prob_collect::opt::random_multi_quadratic_function::optimal_variable ( ) const -> const Eigen::VectorXd&
inlinenodiscardnoexcept

Get the optimal variable.

Returns
Optimal variable.

Definition at line 101 of file random_multi_quadratic_function.h.

◆ value()

auto num_prob_collect::opt::random_multi_quadratic_function::value ( ) const -> const double&
inlinenodiscardnoexcept

Get function value.

Returns
Function value.

Definition at line 74 of file random_multi_quadratic_function.h.

Member Data Documentation

◆ coefficients_

Eigen::VectorXd num_prob_collect::opt::random_multi_quadratic_function::coefficients_
private

Coefficients.

Definition at line 120 of file random_multi_quadratic_function.h.

◆ diff_

Eigen::VectorXd num_prob_collect::opt::random_multi_quadratic_function::diff_ {}
private

Buffer of difference.

Definition at line 123 of file random_multi_quadratic_function.h.

◆ grad_

Eigen::VectorXd num_prob_collect::opt::random_multi_quadratic_function::grad_ {}
private

Gradient.

Definition at line 129 of file random_multi_quadratic_function.h.

◆ hessian_

Eigen::MatrixXd num_prob_collect::opt::random_multi_quadratic_function::hessian_ {}
private

Hessian.

Definition at line 132 of file random_multi_quadratic_function.h.

◆ optimal_variable_

Eigen::VectorXd num_prob_collect::opt::random_multi_quadratic_function::optimal_variable_
private

Optimal variable.

Definition at line 117 of file random_multi_quadratic_function.h.

◆ value_

double num_prob_collect::opt::random_multi_quadratic_function::value_ {0.0}
private

Function value.

Definition at line 126 of file random_multi_quadratic_function.h.


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