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_quadratic_function Class Reference

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

#include <num_prob_collect/opt/random_quadratic_function.h>

+ Collaboration diagram for num_prob_collect::opt::random_quadratic_function:

Public Types

using value_type = double
 Type of function values.
 
using variable_type = double
 Type of variables.
 

Public Member Functions

 random_quadratic_function (double coeff, double optimal_variable) noexcept
 Constructor.
 
auto coeff () const noexcept -> double
 Get the coefficient.
 
void evaluate_on (double variable) noexcept
 Evaluate function value on variable.
 
auto optimal_variable () const noexcept -> double
 Get the optimal variable.
 
auto value () const noexcept -> const double &
 Get function value.
 

Private Attributes

double coeff_
 Coefficient.
 
double optimal_variable_
 Optimal variable.
 
double value_ {0.0}
 Function value.
 

Detailed Description

Class of quadratic functions with random coefficients and optimal variables.

Definition at line 30 of file random_quadratic_function.h.

Member Typedef Documentation

◆ value_type

Type of function values.

Definition at line 35 of file random_quadratic_function.h.

◆ variable_type

Type of variables.

Definition at line 33 of file random_quadratic_function.h.

Constructor & Destructor Documentation

◆ random_quadratic_function()

num_prob_collect::opt::random_quadratic_function::random_quadratic_function ( double coeff,
double optimal_variable )
inlinenoexcept

Constructor.

Parameters
[in]coeffCoefficient.
[in]optimal_variableOptimal variable.

Definition at line 43 of file random_quadratic_function.h.

Member Function Documentation

◆ coeff()

auto num_prob_collect::opt::random_quadratic_function::coeff ( ) const -> double
inlinenodiscardnoexcept

Get the coefficient.

Returns
Coefficient.

Definition at line 70 of file random_quadratic_function.h.

◆ evaluate_on()

void num_prob_collect::opt::random_quadratic_function::evaluate_on ( double variable)
inlinenoexcept

Evaluate function value on variable.

Parameters
[in]variableVariable.

Definition at line 51 of file random_quadratic_function.h.

◆ optimal_variable()

auto num_prob_collect::opt::random_quadratic_function::optimal_variable ( ) const -> double
inlinenodiscardnoexcept

Get the optimal variable.

Returns
Optimal variable.

Definition at line 77 of file random_quadratic_function.h.

◆ value()

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

Get function value.

Returns
Function value.

Definition at line 61 of file random_quadratic_function.h.

Member Data Documentation

◆ coeff_

double num_prob_collect::opt::random_quadratic_function::coeff_
private

Coefficient.

Definition at line 83 of file random_quadratic_function.h.

◆ optimal_variable_

double num_prob_collect::opt::random_quadratic_function::optimal_variable_
private

Optimal variable.

Definition at line 86 of file random_quadratic_function.h.

◆ value_

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

Function value.

Definition at line 89 of file random_quadratic_function.h.


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