61 [[nodiscard]]
auto value() const noexcept -> const
double& {
70 [[nodiscard]]
auto coeff() const noexcept ->
double {
return coeff_; }
Class to generate random quadratic functions.
std::uniform_real_distribution< double > coeff_dist_
Distribution of coefficients.
std::mt19937 generator_
Random number generator.
random_quadratic_function_generator() noexcept=default
Constructor.
static constexpr double max_variable
Maximum optimal variable.
static constexpr double min_variable
Minimum optimal variable.
std::uniform_real_distribution< double > optimal_variable_dist_
Distribution of optimal variables.
Class of quadratic functions with random coefficients and optimal variables.
random_quadratic_function(double coeff, double optimal_variable) noexcept
Constructor.
auto optimal_variable() const noexcept -> double
Get the optimal variable.
double value_
Function value.
double coeff_
Coefficient.
double value_type
Type of function values.
auto coeff() const noexcept -> double
Get the coefficient.
void evaluate_on(double variable) noexcept
Evaluate function value on variable.
auto value() const noexcept -> const double &
Get function value.
double variable_type
Type of variables.
double optimal_variable_
Optimal variable.
Namespace of optimization problems.