SOT
Public Member Functions | Protected Attributes | List of all members
sot::Result Class Reference

Optimization result class. More...

#include <utils.h>

Public Member Functions

 Result (int maxEvals, int dim)
 Constructor. More...
 
int dim () const
 Method for getting the number of dimensions. More...
 
int numEvals () const
 Method for getting the number of finished evaluations. More...
 
vec fX () const
 Method for getting the values of the finished evaluations. More...
 
mat X () const
 Method for getting the evaluated points. More...
 
vec xBest () const
 Method for getting the best solution found so far. More...
 
double fBest () const
 Method for getting the value of the best solution found so far. More...
 
void addEval (const vec &x, double funVal)
 Method for adding a finished evaluation. More...
 
void addEvals (const mat &X, const vec &funVals)
 Method for adding a finished evaluations. More...
 
void reset ()
 Method for resetting the object.
 

Protected Attributes

int mNumEvals = 0
 
int mDim
 
int mMaxEvals
 
vec mfX
 
mat mX
 
double mfBest
 
vec mxBest
 

Detailed Description

Optimization result class.

This is a class that stores the result from the optimization runs and is returned from all of the strategies. It stores the values from all of the evaluations and the best solution and function value.

Author
David Eriksson, dme65.nosp@m.@cor.nosp@m.nell..nosp@m.edu

Constructor & Destructor Documentation

sot::Result::Result ( int  maxEvals,
int  dim 
)
inline

Constructor.

Parameters
maxEvalsEvaluation budget
dimNumber of dimensions

Member Function Documentation

void sot::Result::addEval ( const vec x,
double  funVal 
)
inline

Method for adding a finished evaluation.

Parameters
xEvaluated point
funValValue of the evaluated point
void sot::Result::addEvals ( const mat X,
const vec funVals 
)
inline

Method for adding a finished evaluations.

Parameters
XEvaluated points
funValsValues of the evaluated points
int sot::Result::dim ( ) const
inline

Method for getting the number of dimensions.

Returns
Number of dimensions
double sot::Result::fBest ( ) const
inline

Method for getting the value of the best solution found so far.

Returns
Value of best solution found so far
vec sot::Result::fX ( ) const
inline

Method for getting the values of the finished evaluations.

Returns
Values of finished evluations
int sot::Result::numEvals ( ) const
inline

Method for getting the number of finished evaluations.

Returns
Number of finished evaluations
mat sot::Result::X ( ) const
inline

Method for getting the evaluated points.

Returns
Evaluated points
vec sot::Result::xBest ( ) const
inline

Method for getting the best solution found so far.

Returns
Best solution found so far

Member Data Documentation

int sot::Result::mDim
protected

Number of dimensions

double sot::Result::mfBest
protected

Best function value

vec sot::Result::mfX
protected

Function values

int sot::Result::mMaxEvals
protected

Evaluation budget

int sot::Result::mNumEvals = 0
protected

Number of evaluations

mat sot::Result::mX
protected

Evaluated points

vec sot::Result::mxBest
protected

Best solution found


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