#include <HCOD.hpp>
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) |
Stage & | stage (Index i) |
const Stage & | stage (Index i) const |
Stage & | operator[] (Index i) |
const Stage & | operator[] (Index i) const |
void | setInitialActiveSet () |
void | setInitialActiveSet (const cstref_vector_t &Ir0, Index k) |
cstref_vector_t | getOptimalActiveSet (Index k) |
std::vector< cstref_vector_t > | getOptimalActiveSet () |
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_t > | stage_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) |
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] |
soth::HCOD::HCOD | ( | void | ) | [inline, protected] |
void soth::HCOD::activeSearch | ( | VectorXd & | u | ) |
References soth::BaseY::computeExplicitly(), computeLagrangeMultipliers(), computeSolution(), computeStepAndUpdate(), damp(), initialize(), makeStep(), soth::BaseY::matrixExplicit, nbStages(), searchAndDowndate(), show(), sotDEBUG, sotDEBUG_ENABLE, soth::sotDEBUGFLOW, sotDEBUGIN, stages, testRecomposition(), testSolution(), and Y.
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 | ) |
References isInit, isSolutionCpt, soth::BaseY::matrixExplicit, soth::BaseY::multiply(), solution, sotDEBUG, sotDEBUGIN, sotDEBUGOUT, stages, uNext, Y, Ytu, and YtuNext.
Referenced by activeSearch().
double soth::HCOD::computeStep | ( | void | ) |
References isSolutionCpt, solution, sotDEBUG, stages, and uNext.
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 |
||
) |
References isDebugOnce, soth::sotDebugTrace::openFile(), and sotDEBUG.
References isInit, stages, and updateY().
Referenced by searchAndDowndate().
void soth::HCOD::downdate | ( | stage_iter_t | stageIter, |
const Index & | row | ||
) |
cstref_vector_t soth::HCOD::getOptimalActiveSet | ( | Index | k | ) |
References soth::Stage::getOptimalActiveSet(), and stage().
std::vector< cstref_vector_t > soth::HCOD::getOptimalActiveSet | ( | ) |
References stages.
void soth::HCOD::initialize | ( | void | ) |
References isInit, isReset, soth::BaseY::matrixExplicit, reset(), sotDEBUG, stages, and Y.
Referenced by activeSearch().
void soth::HCOD::makeStep | ( | double | tau, |
bool | compute_u = true |
||
) |
void soth::HCOD::makeStep | ( | bool | compute_u = true | ) |
Index soth::HCOD::nbStages | ( | ) | const [inline] |
Referenced by activeSearch().
void soth::HCOD::notifiorRegistration | ( | const Stage::listener_function_t & | f, |
int | stageRank = -1 |
||
) |
References stages.
void soth::HCOD::pushBackStage | ( | const MatrixXd & | J, |
const VectorBound & | bounds | ||
) |
References isInit, stages, and Y.
Referenced by pushBackStages().
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 | ) |
References isInit, isReset, isSolutionCpt, soth::BaseY::reset(), solution, stages, Y, and Ytu.
Referenced by initialize().
bool soth::HCOD::search | ( | const Index & | stageRef | ) |
References soth::Stage::EPSILON, solution, and stages.
bool soth::HCOD::searchAndDowndate | ( | const Index & | stageRef | ) |
References downdate(), soth::Stage::EPSILON, solution, and stages.
Referenced by activeSearch().
void soth::HCOD::setInitialActiveSet | ( | ) |
References stages.
Referenced by setInitialActiveSet().
void soth::HCOD::setInitialActiveSet | ( | const cstref_vector_t & | Ir0, |
Index | k | ||
) |
References soth::Stage::setInitialActiveSet(), sotDEBUG, and stage().
void soth::HCOD::setInitialActiveSet | ( | const std::vector< cstref_vector_t > & | Ir | ) |
References setInitialActiveSet(), sotDEBUGIN, sotDEBUGOUT, and stages.
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.
References stages.
Referenced by getOptimalActiveSet(), and setInitialActiveSet().
bool soth::HCOD::testLagrangeMultipliers | ( | Index | stageRef, |
std::ostream * | os = NULL |
||
) | const |
bool soth::HCOD::testLagrangeMultipliers | ( | Index | stageRef, |
std::ostream & | os | ||
) | const [inline] |
References testLagrangeMultipliers().
Referenced by testLagrangeMultipliers().
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] |
References soth::GivensSequence::applyTransposeOnTheRight(), soth::BaseY::matrixExplicit, sotDEBUG, Y, Ytu, and YtuNext.
Referenced by downdate(), and update().
void soth::HCOD::useDamp | ( | bool | c | ) | [inline] |
bool soth::HCOD::useDamp | ( | ) | const [inline] |
Referenced by damp(), downdate(), getMaxDamping(), and setDamping().
Referenced by debugOnce().
bool soth::HCOD::isInit |
Referenced by computeSolution(), damp(), downdate(), initialize(), pushBackStage(), reset(), and update().
bool soth::HCOD::isReset |
Referenced by initialize(), and reset().
Referenced by computeLagrangeMultipliers(), computeSolution(), computeStep(), computeStepAndUpdate(), and reset().
VectorXd soth::HCOD::rho |
Referenced by computeLagrangeMultipliers().
Referenced by pushBackStage().
VectorXd soth::HCOD::solution |
Referenced by computeSolution(), computeStep(), computeStepAndUpdate(), downdate(), makeStep(), reset(), search(), and searchAndDowndate().
Referenced by activeSearch(), computeLagrangeMultipliers(), computeSolution(), computeStep(), computeStepAndUpdate(), damp(), downdate(), getMaxDamping(), getOptimalActiveSet(), HCOD(), initialize(), notifiorRegistration(), pushBackStage(), rank(), reset(), search(), searchAndDowndate(), setDamping(), setInitialActiveSet(), setNameByOrder(), sizeA(), stage(), and update().
VectorXd soth::HCOD::uNext |
Referenced by computeSolution(), computeStep(), computeStepAndUpdate(), and makeStep().
bool soth::HCOD::withDamp |
Referenced by activeSearch(), computeSolution(), initialize(), pushBackStage(), reset(), update(), and updateY().
VectorXd soth::HCOD::Ytu |
Referenced by computeLagrangeMultipliers(), computeSolution(), makeStep(), reset(), and updateY().
VectorXd soth::HCOD::YtuNext |
Referenced by computeSolution(), makeStep(), and updateY().