scsolver::numeric::nlp::BaseAlgorithm Class Reference

#include <nlpbase.hxx>

Inheritance diagram for scsolver::numeric::nlp::BaseAlgorithm:

Inheritance graph
[legend]

List of all members.

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

ModelgetModel () const

Private Attributes

::std::auto_ptr
< BaseAlgorithmImpl
m_pImpl


Detailed Description

Definition at line 41 of file nlpbase.hxx.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
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.

Returns:
std::vector<double> optimized solution

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  ) 

Definition at line 72 of file nlpbase.cxx.

References m_pImpl.

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.

Returns:
Model* pointer to current 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().


Member Data Documentation

::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().


The documentation for this class was generated from the following files:
Generated on Mon Jul 28 09:13:52 2008 for scsolver by  doxygen 1.5.3