All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
soth::HCOD Class Reference

#include <HCOD.hpp>

Collaboration diagram for soth::HCOD:
[legend]

Public Member Functions

 HCOD (Index sizeProblem, Index nbStage=0)
 
void pushBackStage (const MatrixXd &J, const VectorBound &bounds)
 
void pushBackStage (const Index &nr, const double *Jdata, const Bound *bdata)
 
void pushBackStage (const Index &nr, const double *Jdata)
 
void pushBackStages (const std::vector< MatrixXd > &J, const std::vector< VectorBound > &bounds)
 
Stagestage (Index i)
 
const Stagestage (Index i) const
 
Stageoperator[] (Index i)
 
const Stageoperator[] (Index i) const
 
void setInitialActiveSet ()
 
void setInitialActiveSet (const cstref_vector_t &Ir0, Index k)
 
cstref_vector_t getOptimalActiveSet (Index k)
 
std::vector< cstref_vector_tgetOptimalActiveSet ()
 
void setInitialActiveSet (const std::vector< cstref_vector_t > &Ir)
 
void useDamp (bool c)
 
bool useDamp () const
 
void setDamping (const double &d)
 
double getMaxDamping () const
 
Index sizeA () const
 
int rank () const
 
Index nbStages () const
 
void reset (void)
 
void initialize (void)
 
void update (const Index &stageUp, const ConstraintRef &cst)
 
void update (stage_iter_t stageIter, const ConstraintRef &cst)
 
void downdate (const Index &stageDown, const Index &row)
 
void downdate (stage_iter_t stageIter, const Index &row)
 
void damp (void)
 
void computeSolution (bool compute_u=true)
 
void computeLagrangeMultipliers (const Index &stageRef)
 
double computeStepAndUpdate (void)
 
double computeStep (void)
 
bool searchAndDowndate (const Index &stageRef)
 
bool search (const Index &stageRef)
 
void makeStep (double tau, bool compute_u=true)
 
void makeStep (bool compute_u=true)
 
void activeSearch (VectorXd &u)
 
void show (std::ostream &os, bool check=false)
 
void showActiveSet (std::ostream &os) const
 
bool testRecomposition (std::ostream *os=NULL)
 
bool testSolution (std::ostream *os=NULL)
 
bool testLagrangeMultipliers (Index stageRef, std::ostream *os=NULL) const
 
bool testLagrangeMultipliers (Index stageRef, std::ostream &os) const
 
void setNameByOrder (const std::string root="")
 
void notifiorRegistration (const Stage::listener_function_t &f, int stageRank=-1)
 
void debugOnce (std::string filename="", bool keepOpen=false)
 

Public Attributes

bool isDebugOnce
 
Index sizeProblem
 
soth::BaseY Y
 
stage_sequence_t stages
 
VectorXd solution
 
VectorXd uNext
 
VectorXd Ytu
 
VectorXd YtuNext
 
VectorXd rho
 
int freezedStages
 
bool isReset
 
bool isInit
 
bool isSolutionCpt
 
bool withDamp
 

Protected Types

typedef boost::shared_ptr
< soth::Stage
stage_ptr_t
 
typedef std::vector< stage_ptr_tstage_sequence_t
 
typedef stage_sequence_t::iterator stage_iter_t
 
typedef
stage_sequence_t::const_iterator 
stage_citer_t
 
typedef
stage_sequence_t::reverse_iterator 
stage_riter_t
 
typedef stage_sequence_t::size_type stage_sequence_size_t
 
typedef MatrixXd::Index Index
 

Protected Member Functions

void updateY (const GivensSequence &Yup)
 
 HCOD (void)
 

Member Typedef Documentation

typedef MatrixXd::Index soth::HCOD::Index
protected
typedef stage_sequence_t::const_iterator soth::HCOD::stage_citer_t
protected
typedef stage_sequence_t::iterator soth::HCOD::stage_iter_t
protected
typedef boost::shared_ptr<soth::Stage> soth::HCOD::stage_ptr_t
protected
typedef stage_sequence_t::reverse_iterator soth::HCOD::stage_riter_t
protected
typedef stage_sequence_t::size_type soth::HCOD::stage_sequence_size_t
protected
typedef std::vector<stage_ptr_t> soth::HCOD::stage_sequence_t
protected

Constructor & Destructor Documentation

soth::HCOD::HCOD ( Index  sizeProblem,
Index  nbStage = 0 
)

References stages.

soth::HCOD::HCOD ( void  )
inlineprotected

Member Function Documentation

void soth::HCOD::computeLagrangeMultipliers ( const Index stageRef)

References isSolutionCpt, rho, sotDEBUG, stages, and Ytu.

Referenced by activeSearch().

void soth::HCOD::computeSolution ( bool  compute_u = true)
double soth::HCOD::computeStep ( void  )
double soth::HCOD::computeStepAndUpdate ( void  )

References isSolutionCpt, solution, sotDEBUG, stages, uNext, and update().

Referenced by activeSearch().

void soth::HCOD::damp ( void  )

References isInit, sotDEBUG, stages, and useDamp().

Referenced by activeSearch().

void soth::HCOD::debugOnce ( std::string  filename = "",
bool  keepOpen = false 
)
void soth::HCOD::downdate ( const Index stageDown,
const Index row 
)

References isInit, stages, and updateY().

Referenced by searchAndDowndate().

double soth::HCOD::getMaxDamping ( ) const

References stages, and useDamp().

cstref_vector_t soth::HCOD::getOptimalActiveSet ( Index  k)
std::vector< cstref_vector_t > soth::HCOD::getOptimalActiveSet ( )

References stages.

void soth::HCOD::initialize ( void  )
void soth::HCOD::makeStep ( double  tau,
bool  compute_u = true 
)

References solution, sotDEBUG, uNext, Ytu, and YtuNext.

Referenced by activeSearch().

void soth::HCOD::makeStep ( bool  compute_u = true)

References solution, sotDEBUG, uNext, Ytu, and YtuNext.

Index soth::HCOD::nbStages ( ) const
inline

Referenced by activeSearch().

void soth::HCOD::notifiorRegistration ( const Stage::listener_function_t f,
int  stageRank = -1 
)

References stages.

Stage& soth::HCOD::operator[] ( Index  i)
inline
const Stage& soth::HCOD::operator[] ( Index  i) const
inline
void soth::HCOD::pushBackStage ( const MatrixXd &  J,
const VectorBound bounds 
)

References isInit, stages, and Y.

Referenced by pushBackStages().

void soth::HCOD::pushBackStage ( const Index nr,
const double *  Jdata,
const Bound bdata 
)

References isInit, sizeProblem, stages, and Y.

void soth::HCOD::pushBackStage ( const Index nr,
const double *  Jdata 
)

References isInit, sizeProblem, stages, and Y.

void soth::HCOD::pushBackStages ( const std::vector< MatrixXd > &  J,
const std::vector< VectorBound > &  bounds 
)

References pushBackStage().

int soth::HCOD::rank ( ) const

References stages.

void soth::HCOD::reset ( void  )
bool soth::HCOD::search ( const Index stageRef)
bool soth::HCOD::searchAndDowndate ( const Index stageRef)

References downdate(), soth::Stage::EPSILON, solution, and stages.

Referenced by activeSearch().

void soth::HCOD::setDamping ( const double &  d)

References stages, and useDamp().

void soth::HCOD::setInitialActiveSet ( )

References stages.

Referenced by setInitialActiveSet().

void soth::HCOD::setInitialActiveSet ( const cstref_vector_t Ir0,
Index  k 
)
void soth::HCOD::setInitialActiveSet ( const std::vector< cstref_vector_t > &  Ir)
void soth::HCOD::setNameByOrder ( const std::string  root = "")

References stages.

void soth::HCOD::show ( std::ostream &  os,
bool  check = false 
)

References sotDEBUGIN, and sotDEBUGOUT.

Referenced by activeSearch().

void soth::HCOD::showActiveSet ( std::ostream &  os) const

References sotDEBUGIN, and sotDEBUGOUT.

HCOD::Index soth::HCOD::sizeA ( ) const

References stages.

Stage & soth::HCOD::stage ( Index  i)

References stages.

Referenced by getOptimalActiveSet(), and setInitialActiveSet().

const Stage & soth::HCOD::stage ( Index  i) const

References stages.

bool soth::HCOD::testLagrangeMultipliers ( Index  stageRef,
std::ostream *  os = NULL 
) const
bool soth::HCOD::testLagrangeMultipliers ( Index  stageRef,
std::ostream &  os 
) const
inline
bool soth::HCOD::testRecomposition ( std::ostream *  os = NULL)

References sotDEBUGPRIOR.

Referenced by activeSearch().

bool soth::HCOD::testSolution ( std::ostream *  os = NULL)

References sotDEBUGPRIOR.

Referenced by activeSearch().

void soth::HCOD::update ( const Index stageUp,
const ConstraintRef cst 
)

References isInit, stages, and updateY().

Referenced by computeStepAndUpdate().

void soth::HCOD::update ( stage_iter_t  stageIter,
const ConstraintRef cst 
)
void soth::HCOD::updateY ( const GivensSequence Yup)
protected
void soth::HCOD::useDamp ( bool  c)
inline
bool soth::HCOD::useDamp ( ) const
inline

Member Data Documentation

int soth::HCOD::freezedStages
bool soth::HCOD::isDebugOnce

Referenced by debugOnce().

bool soth::HCOD::isInit
bool soth::HCOD::isReset

Referenced by initialize(), and reset().

bool soth::HCOD::isSolutionCpt
VectorXd soth::HCOD::rho
Index soth::HCOD::sizeProblem

Referenced by pushBackStage().

VectorXd soth::HCOD::uNext
bool soth::HCOD::withDamp
VectorXd soth::HCOD::Ytu
VectorXd soth::HCOD::YtuNext

Referenced by computeSolution(), makeStep(), and updateY().