49 virtual void defaultOptions()
55 virtual void getOptions()
69 gsMatrix<T> & currentDesign() {
return m_curDesign; }
71 T currentObjValue()
const
73 gsAsConstVector<T> tmp(
m_curDesign.data(), m_op->numDesignVars());
74 return m_op->evalObj(tmp);
77 T objective()
const {
return m_finalObjective; }
79 int iterations()
const {
return m_numIterations; }
81 gsOptionList & options() {
return m_options; }
85 virtual void solve (
const gsMatrix<T> & initialGuess) = 0;
93 std::ostream &print(std::ostream &os)
const
102 gsOptProblem<T> * m_op;
109 index_t m_maxIterations, m_verbose;
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Class defining an optimization problem.
Definition gsOptProblem.h:25
Class defining an optimizer.
Definition gsOptimizer.h:28
gsOptimizer()
Definition gsOptimizer.h:32
virtual ~gsOptimizer()
Definition gsOptimizer.h:45
gsOptionList m_options
Options.
Definition gsOptimizer.h:108
virtual bool intermediateCallback()
Callback function is executed after every iteration. Returning false causes premature termination of ...
Definition gsOptimizer.h:64
gsMatrix< T > m_curDesign
Current design variables (and starting point )
Definition gsOptimizer.h:105
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
void addInt(const std::string &label, const std::string &desc, const index_t &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:201
const index_t & getInt(const std::string &label) const
Reads value for option label from options.
Definition gsOptionList.cpp:37
#define index_t
Definition gsConfig.h:32
This is the main header file that collects wrappers of Eigen for linear algebra.
Provides declaration of an optimization problem.
Provides a list of labeled parameters/options that can be set and accessed easily.
The G+Smo namespace, containing all definitions for the library.