#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) | |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
void soth::HCOD::activeSearch | ( | VectorXd & | u | ) |
References soth::BaseY::computeExplicitly(), computeLagrangeMultipliers(), computeSolution(), computeStepAndUpdate(), damp(), initialize(), makeStep(), soth::BaseY::matrixExplicit, nbStages(), searchAndDowndate(), show(), solution, sotDEBUG, sotDEBUG_ENABLE, soth::sotDEBUGFLOW, sotDEBUGIN, sotDEBUGOUT, 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 | ) |
|
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 soth::BaseY::applyThisOnTheLeft(), soth::Stage::EPSILON, isSolutionCpt, soth::BaseY::matrixExplicit, sizeProblem, solution, sotDEBUGIN, sotDEBUGOUT, stages, uNext, Y, Ytu, and YtuNext.
Referenced by activeSearch().
void soth::HCOD::showActiveSet | ( | std::ostream & | os | ) | const |
References sotDEBUGIN, sotDEBUGOUT, and stages.
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 |
|
inline |
bool soth::HCOD::testRecomposition | ( | std::ostream * | os = NULL | ) |
References sotDEBUGPRIOR, and stages.
Referenced by activeSearch().
bool soth::HCOD::testSolution | ( | std::ostream * | os = NULL | ) |
References sotDEBUGPRIOR, stages, and uNext.
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 | ||
) |
|
protected |
References soth::GivensSequence::applyTransposeOnTheRight(), soth::BaseY::matrixExplicit, sotDEBUG, Y, Ytu, and YtuNext.
Referenced by downdate(), and update().
|
inline |
|
inline |
Referenced by damp(), downdate(), getMaxDamping(), and setDamping().
int soth::HCOD::freezedStages |
bool soth::HCOD::isDebugOnce |
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().
bool soth::HCOD::isSolutionCpt |
Referenced by computeLagrangeMultipliers(), computeSolution(), computeStep(), computeStepAndUpdate(), reset(), and show().
VectorXd soth::HCOD::rho |
Referenced by computeLagrangeMultipliers().
Index soth::HCOD::sizeProblem |
Referenced by pushBackStage(), show(), and testLagrangeMultipliers().
VectorXd soth::HCOD::solution |
Referenced by activeSearch(), computeSolution(), computeStep(), computeStepAndUpdate(), downdate(), makeStep(), reset(), search(), searchAndDowndate(), show(), and testLagrangeMultipliers().
stage_sequence_t soth::HCOD::stages |
Referenced by activeSearch(), computeLagrangeMultipliers(), computeSolution(), computeStep(), computeStepAndUpdate(), damp(), downdate(), getMaxDamping(), getOptimalActiveSet(), HCOD(), initialize(), notifiorRegistration(), pushBackStage(), rank(), reset(), search(), searchAndDowndate(), setDamping(), setInitialActiveSet(), setNameByOrder(), show(), showActiveSet(), sizeA(), stage(), testLagrangeMultipliers(), testRecomposition(), testSolution(), and update().
VectorXd soth::HCOD::uNext |
Referenced by computeSolution(), computeStep(), computeStepAndUpdate(), makeStep(), show(), and testSolution().
bool soth::HCOD::withDamp |
soth::BaseY soth::HCOD::Y |
Referenced by activeSearch(), computeSolution(), initialize(), pushBackStage(), reset(), show(), testLagrangeMultipliers(), update(), and updateY().
VectorXd soth::HCOD::Ytu |
Referenced by computeLagrangeMultipliers(), computeSolution(), makeStep(), reset(), show(), testLagrangeMultipliers(), and updateY().
VectorXd soth::HCOD::YtuNext |
Referenced by computeSolution(), makeStep(), show(), and updateY().