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

Class to generate random quadratic functions. More...

#include <num_prob_collect/opt/random_quadratic_function.h>

+ Collaboration diagram for num_prob_collect::opt::random_quadratic_function_generator:

Public Member Functions

 random_quadratic_function_generator () noexcept=default
 Constructor.
 
auto operator() () noexcept -> random_quadratic_function
 Generate a random quadratic function.
 

Static Public Attributes

static constexpr double max_variable = 10.0
 Maximum optimal variable.
 
static constexpr double min_variable = -10.0
 Minimum optimal variable.
 

Private Attributes

std::uniform_real_distribution< double > coeff_dist_ {0.5, 3.0}
 Distribution of coefficients.
 
std::mt19937 generator_ {}
 Random number generator.
 
std::uniform_real_distribution< double > optimal_variable_dist_
 Distribution of optimal variables.
 

Detailed Description

Class to generate random quadratic functions.

Definition at line 95 of file random_quadratic_function.h.

Member Function Documentation

◆ operator()()

auto num_prob_collect::opt::random_quadratic_function_generator::operator() ( ) -> random_quadratic_function
inlinenodiscardnoexcept

Generate a random quadratic function.

Returns
Generated quadratic function.

Definition at line 113 of file random_quadratic_function.h.

Member Data Documentation

◆ coeff_dist_

std::uniform_real_distribution<double> num_prob_collect::opt::random_quadratic_function_generator::coeff_dist_ {0.5, 3.0}
private

Distribution of coefficients.

Definition at line 125 of file random_quadratic_function.h.

◆ generator_

std::mt19937 num_prob_collect::opt::random_quadratic_function_generator::generator_ {}
private

Random number generator.

Definition at line 122 of file random_quadratic_function.h.

◆ max_variable

double num_prob_collect::opt::random_quadratic_function_generator::max_variable = 10.0
staticconstexpr

Maximum optimal variable.

Definition at line 101 of file random_quadratic_function.h.

◆ min_variable

double num_prob_collect::opt::random_quadratic_function_generator::min_variable = -10.0
staticconstexpr

Minimum optimal variable.

Definition at line 98 of file random_quadratic_function.h.

◆ optimal_variable_dist_

std::uniform_real_distribution<double> num_prob_collect::opt::random_quadratic_function_generator::optimal_variable_dist_
private
Initial value:

Distribution of optimal variables.

Definition at line 128 of file random_quadratic_function.h.


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