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;
Class defining an optimization problem.
Definition: gsOptProblem.h:24
virtual ~gsOptimizer()
Definition: gsOptimizer.h:45
Class defining an optimizer.
Definition: gsOptimizer.h:27
gsOptionList m_options
Options.
Definition: gsOptimizer.h:108
gsOptimizer()
Definition: gsOptimizer.h:32
#define index_t
Definition: gsConfig.h:32
Provides declaration of an optimization problem.
const index_t & getInt(const std::string &label) const
Reads value for option label from options.
Definition: gsOptionList.cpp:37
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
Provides a list of labeled parameters/options that can be set and accessed easily.
virtual bool intermediateCallback()
Callback function is executed after every iteration. Returning false causes premature termination of ...
Definition: gsOptimizer.h:64
This is the main header file that collects wrappers of Eigen for linear algebra.
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
gsMatrix< T > m_curDesign
Current design variables (and starting point )
Definition: gsOptimizer.h:105