Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mc::optim::Solution Struct Reference

Represents a candidate solution in the search space. More...

#include <types.hpp>

Collaboration diagram for mc::optim::Solution:

Public Member Functions

bool isBetterThan (const Solution &other, OptimizationMode mode) const
 Compare two solutions according to the optimization mode.
 

Static Public Member Functions

static Solution make_worst (OptimizationMode mode)
 Helper to create a worst-case solution for initialization.
 

Public Attributes

Coordinates params
 Parameter vector (coordinates in the search space).
 
Real value
 Evaluated objective value for params.
 

Detailed Description

Represents a candidate solution in the search space.

Contains both the parameters (position) and the evaluated cost (value).

Definition at line 51 of file types.hpp.

Member Function Documentation

◆ isBetterThan()

bool mc::optim::Solution::isBetterThan ( const Solution other,
OptimizationMode  mode 
) const
inline

Compare two solutions according to the optimization mode.

Returns
true if this solution is better than other.

Definition at line 74 of file types.hpp.

◆ make_worst()

static Solution mc::optim::Solution::make_worst ( OptimizationMode  mode)
inlinestatic

Helper to create a worst-case solution for initialization.

If minimizing, the worst value is +Infinity; if maximizing, it's -Infinity.

Definition at line 62 of file types.hpp.

Member Data Documentation

◆ params

Coordinates mc::optim::Solution::params

Parameter vector (coordinates in the search space).

Definition at line 53 of file types.hpp.

◆ value

Real mc::optim::Solution::value

Evaluated objective value for params.

Definition at line 55 of file types.hpp.


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