12 std::set<OptimizableGraph::Vertex*> vset;
15 for (
size_t i=0; i<e->
vertices().size(); i++){
21 for (std::set<OptimizableGraph::Vertex*>::iterator it=vset.begin(); it!=vset.end(); it++){
28 for (HyperGraph::VertexSet::iterator it =
_gauge.begin(); it!=
_gauge.end(); it++){
44 cerr <<
"!!! optimization failure" << endl;
47 for (HyperGraph::VertexSet::iterator it=
_gauge.begin(); it!=
_gauge.end(); it++){
63 cerr <<
"FATAL: failure while building linear structure" << endl;
70 std::set<OptimizableGraph::Edge*> star;
80 for (std::set<OptimizableGraph::Vertex*>::iterator it=vset.begin(); it!=vset.end(); it++){
84 for (HyperGraph::VertexSet::iterator it=
_gauge.begin(); it!=
_gauge.end(); it++){
virtual void computeInitialGuess()
int labelEdges(std::set< OptimizableGraph::Edge * > &edges)
int id() const
returns the id
SparseOptimizer * optimizer()
returns the optimizer
HyperGraph::EdgeSet _lowLevelEdges
edges in the lower level
int optimize(int iterations, bool online=false)
virtual bool init(bool online=false)=0
OptimizationAlgorithm * solver()
int hessianIndex() const
temporary index of this node in the parameter vector obtained from linearization
void computeActiveErrors()
Base for solvers operating on the approximated Hessian, e.g., Gauss-Newton, Levenberg.
Star(int level, SparseOptimizer *optimizer)
bool labelStarEdges(int iterations, EdgeLabeler *labeler)
HyperGraph::EdgeSet _starEdges
edges in the star
const VertexContainer & vertices() const
const VertexContainer & indexMapping() const
the index mapping of the vertices
virtual void push()=0
backup the position of the vertex to a stack
virtual void pop()=0
restore the position of the vertex by retrieving the position from the stack
HyperGraph::VertexSet _gauge
vertices that are fixed (center of the star)
virtual bool buildLinearStructure()
A general case Vertex for optimization.
const VertexContainer & activeVertices() const
the vertices active in the current optimization
SparseOptimizer * _optimizer
optimizer
void setFixed(bool fixed)
true => this node should be considered fixed during the optimization
virtual bool initializeOptimization(HyperGraph::EdgeSet &eset)
virtual void updateLinearSystem()