scsolver::numeric::lp::BaseAlgorithm Class Reference

#include <lpbase.hxx>

Inheritance diagram for scsolver::numeric::lp::BaseAlgorithm:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 BaseAlgorithm ()
virtual ~BaseAlgorithm ()=0
virtual void solve ()=0
ModelgetModel () const
void setModel (Model *)
ModelgetCanonicalModel () const
::scsolver::numeric::Matrix getSolution () const
void setSolution (const ::scsolver::numeric::Matrix &)
void setCanonicalSolution (const ::scsolver::numeric::Matrix &mx)

Private Attributes

::std::auto_ptr
< BaseAlgorithmImpl
m_pImpl


Detailed Description

Definition at line 43 of file lpbase.hxx.


Constructor & Destructor Documentation

scsolver::numeric::lp::BaseAlgorithm::BaseAlgorithm (  ) 

Definition at line 234 of file lpbase.cxx.

scsolver::numeric::lp::BaseAlgorithm::~BaseAlgorithm (  )  [pure virtual]

Definition at line 239 of file lpbase.cxx.


Member Function Documentation

virtual void scsolver::numeric::lp::BaseAlgorithm::solve (  )  [pure virtual]

Implemented in scsolver::numeric::lp::RevisedSimplex, scsolver::numeric::lp::BoundedRevisedSimplex, scsolver::numeric::lp::LpSolve, and scsolver::numeric::lp::UnoAlgorithm.

Model * scsolver::numeric::lp::BaseAlgorithm::getModel (  )  const

Definition at line 243 of file lpbase.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::getModel(), scsolver::numeric::lp::UnoAlgorithm::solve(), and scsolver::numeric::lp::LpSolve::solve().

void scsolver::numeric::lp::BaseAlgorithm::setModel ( Model p  ) 

Definition at line 248 of file lpbase.cxx.

References m_pImpl.

Model * scsolver::numeric::lp::BaseAlgorithm::getCanonicalModel (  )  const

This method returns a pointer to a canonical version of stored model. A canonical model is an original model with all its constant equivalent variables taken out. Note that when this method is used to obtain a model, then the solution reached needs to be set via setCanonicalSolution() call, or else the behavior is undefined.

Returns:
Model* pointer to canonical model

Definition at line 253 of file lpbase.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::BoundedRevisedSimplexImpl::initialize(), and scsolver::numeric::lp::RevisedSimplexImpl::solve().

Matrix scsolver::numeric::lp::BaseAlgorithm::getSolution (  )  const

Definition at line 258 of file lpbase.cxx.

References m_pImpl.

Referenced by scsolver::numeric::lp::RevisedSimplexImpl::solve().

void scsolver::numeric::lp::BaseAlgorithm::setSolution ( const ::scsolver::numeric::Matrix  ) 

Referenced by scsolver::numeric::lp::UnoAlgorithm::solve(), and scsolver::numeric::lp::LpSolve::solve().

void scsolver::numeric::lp::BaseAlgorithm::setCanonicalSolution ( const ::scsolver::numeric::Matrix mx  ) 

This method must be called to set a final solution if a canonical model is solved instead of an original model. When this is called, it reconstructs a solution for the original model by bringing back those constant equivalent variables which have been removed when getCanonicalModel() method was called.

Parameters:
mx solution matrix

Referenced by scsolver::numeric::lp::BoundedRevisedSimplexImpl::solve(), and scsolver::numeric::lp::RevisedSimplexImpl::solve().


Member Data Documentation

::std::auto_ptr<BaseAlgorithmImpl> scsolver::numeric::lp::BaseAlgorithm::m_pImpl [private]

Reimplemented in scsolver::numeric::lp::RevisedSimplex, scsolver::numeric::lp::BoundedRevisedSimplex, scsolver::numeric::lp::LpSolve, and scsolver::numeric::lp::UnoAlgorithm.

Definition at line 80 of file lpbase.hxx.

Referenced by getCanonicalModel(), getModel(), getSolution(), and setModel().


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