DART  6.7.3
dart::optimizer::Solver::Properties Struct Reference

The Solver::Properties class contains Solver parameters that are common to all Solver types. More...

#include <Solver.hpp>

Inheritance diagram for dart::optimizer::Solver::Properties:
dart::optimizer::GradientDescentSolver::Properties

Public Member Functions

 Properties (std::shared_ptr< Problem > _problem=nullptr, double _tolerance=1e-9, std::size_t _numMaxIterations=500, std::size_t _iterationsPerPrint=0, std::ostream *_ostream=&std::cout, bool _printFinalResult=false, const std::string &_resultFile="")
 

Public Attributes

std::shared_ptr< ProblemmProblem
 Nonlinear optimization Problem to be solved. More...
 
double mTolerance
 The relative tolerance on the optimization parameters. More...
 
std::size_t mNumMaxIterations
 The maximum number of iterations that the solver should use. More...
 
std::size_t mIterationsPerPrint
 How many iterations between printing the Solver's progress to the terminal. More...
 
std::ostream * mOutStream
 Stream for printing the Solver's progress. Default is std::cout. More...
 
bool mPrintFinalResult
 Set to true if the final result should be printed to the terminal. More...
 
std::string mResultFile
 Publish the results of the optimization to a file. More...
 

Detailed Description

The Solver::Properties class contains Solver parameters that are common to all Solver types.

Most (but not necessarily all) Solvers will make use of these parameters, and these parameters can be directly copied or transferred between all Solver types.

Constructor & Destructor Documentation

◆ Properties()

dart::optimizer::Solver::Properties::Properties ( std::shared_ptr< Problem _problem = nullptr,
double  _tolerance = 1e-9,
std::size_t  _numMaxIterations = 500,
std::size_t  _iterationsPerPrint = 0,
std::ostream *  _ostream = &std::cout,
bool  _printFinalResult = false,
const std::string &  _resultFile = "" 
)

Member Data Documentation

◆ mIterationsPerPrint

std::size_t dart::optimizer::Solver::Properties::mIterationsPerPrint

How many iterations between printing the Solver's progress to the terminal.

Use 0 for no printing.

◆ mNumMaxIterations

std::size_t dart::optimizer::Solver::Properties::mNumMaxIterations

The maximum number of iterations that the solver should use.

Use 0 for infinite iterations.

◆ mOutStream

std::ostream* dart::optimizer::Solver::Properties::mOutStream

Stream for printing the Solver's progress. Default is std::cout.

◆ mPrintFinalResult

bool dart::optimizer::Solver::Properties::mPrintFinalResult

Set to true if the final result should be printed to the terminal.

◆ mProblem

std::shared_ptr<Problem> dart::optimizer::Solver::Properties::mProblem

Nonlinear optimization Problem to be solved.

◆ mResultFile

std::string dart::optimizer::Solver::Properties::mResultFile

Publish the results of the optimization to a file.

Leave this string empty to avoid publishing anything.

◆ mTolerance

double dart::optimizer::Solver::Properties::mTolerance

The relative tolerance on the optimization parameters.

For example, the distance between the last parameters and the current parameters to be considered converged.