#include <nlpbase.hxx>

Public Member Functions | |
| BaseAlgorithm () | |
| virtual | ~BaseAlgorithm ()=0 |
| virtual void | solve ()=0 |
| void | setModel (Model *model) |
| const ::std::vector < double > & | getSolution () const |
| void | setDebug (bool debug) |
| bool | isDebug () const |
Protected Member Functions | |
| Model * | getModel () const |
Private Attributes | |
| ::std::auto_ptr < BaseAlgorithmImpl > | m_pImpl |
Definition at line 41 of file nlpbase.hxx.
| scsolver::numeric::nlp::BaseAlgorithm::BaseAlgorithm | ( | ) |
Definition at line 49 of file nlpbase.cxx.
| scsolver::numeric::nlp::BaseAlgorithm::~BaseAlgorithm | ( | ) | [pure virtual] |
Definition at line 53 of file nlpbase.cxx.
| virtual void scsolver::numeric::nlp::BaseAlgorithm::solve | ( | ) | [pure virtual] |
Call this method to solve for optimized solution.
Implemented in scsolver::numeric::nlp::CyclicCoordinate, scsolver::numeric::nlp::HookeJeeves, scsolver::numeric::nlp::QuasiNewton, and scsolver::numeric::nlp::Rosenbrock.
| void scsolver::numeric::nlp::BaseAlgorithm::setModel | ( | Model * | model | ) |
Set NLP model to be optimized. Note that this class does NOT manage the life cycle of this model instance; it is the responsibility of the calling function to ensure that it gets deleted after the optimization code has run.
| model | pointer to NLP model. |
Definition at line 62 of file nlpbase.cxx.
References m_pImpl.
| const vector< double > & scsolver::numeric::nlp::BaseAlgorithm::getSolution | ( | ) | const |
Get the optimized solution. Call this method after solve() returns.
Definition at line 67 of file nlpbase.cxx.
References scsolver::numeric::nlp::Model::getFuncObject(), getModel(), and scsolver::numeric::BaseFuncObj::getVars().
| void scsolver::numeric::nlp::BaseAlgorithm::setDebug | ( | bool | debug | ) |
| bool scsolver::numeric::nlp::BaseAlgorithm::isDebug | ( | ) | const |
Definition at line 77 of file nlpbase.cxx.
References m_pImpl.
Referenced by scsolver::numeric::nlp::Rosenbrock::solve(), and scsolver::numeric::nlp::HookeJeeves::solve().
| Model * scsolver::numeric::nlp::BaseAlgorithm::getModel | ( | ) | const [protected] |
Get current NLP model.
Definition at line 57 of file nlpbase.cxx.
References m_pImpl.
Referenced by getSolution(), scsolver::numeric::nlp::Rosenbrock::solve(), scsolver::numeric::nlp::QuasiNewtonImpl::solve(), scsolver::numeric::nlp::HookeJeeves::solve(), and scsolver::numeric::nlp::CyclicCoordinate::solve().
::std::auto_ptr<BaseAlgorithmImpl> scsolver::numeric::nlp::BaseAlgorithm::m_pImpl [private] |
Reimplemented in scsolver::numeric::nlp::QuasiNewton.
Definition at line 82 of file nlpbase.hxx.
Referenced by getModel(), isDebug(), setDebug(), and setModel().
1.5.3