NDEVR
API Documentation
OptimizableGraph::OGVertexabstract

A general case Vertex for optimization. More...

Inheritance diagram for OptimizableGraph::OGVertex:
[legend]
Collaboration diagram for OptimizableGraph::OGVertex:
[legend]

Public Member Functions

virtual const g_type & b (int i) const =0
 get the b vector element
virtual g_type * bData ()=0
 return a pointer to the b vector associated with this vertex
virtual void clearQuadraticForm ()=0
 set the b vector part of this vertex to zero
int colInHessian () const
 get the row of this vertex in the Hessian
virtual sint04 copyB (g_type *b_) const =0
 copies the b vector in the array b_
virtual sint04 dimension () const =0
 dimension of the estimated state belonging to this node
virtual void discardTop ()=0
 pop the last element from the stack, without restoring the current estimate
virtual sint04 estimateDimension () const
 returns the dimension of the extended representation used by get/setEstimate(g_type*) -1 if it is not supported
bool fixed () const
 true => this node is fixed during the optimization
virtual bool getEstimateData (Buffer< g_type > &estimate) const
 writes the estimater to an array of g_type
virtual bool getEstimateData (g_type *) const
 writes the estimater to an array of g_type
virtual bool getMinimalEstimateData (Buffer< g_type > &estimate) const
 writes the estimate to an array of g_type
virtual bool getMinimalEstimateData (g_type *) const
 writes the estimate to an array of g_type
virtual const g_type & hessian (int i, int j) const =0
 get the element from the hessian matrix
int hessianIndex () const
 temporary index of this node in the parameter vector obtained from linearization
virtual void mapHessianMemory (g_type *d)=0
 maps the internal matrix to some external memory location
bool marginalized () const
 true => this node is marginalized out during the optimization
virtual sint04 minimalEstimateDimension () const
 returns the dimension of the extended representation used by get/setEstimate(g_type*) -1 if it is not supported
void oplus (const g_type *v)
 Update the position of the node from the parameters in v.
virtual void pop ()=0
 restore the position of the vertex by retrieving the position from the stack
virtual void push ()=0
 backup the position of the vertex to a stack
void setColInHessian (int c)
 set the row of this vertex in the Hessian
bool setEstimateData (const Buffer< g_type > &estimate)
 sets the initial estimate from an array of g_type Implement setEstimateDataImpl()
bool setEstimateData (const g_type *estimate)
 sets the initial estimate from an array of g_type Implement setEstimateDataImpl()
void setFixed (bool fixed)
 true => this node should be considered fixed during the optimization
void setHessianIndex (int ti)
 set the temporary index of the vertex in the parameter blocks
virtual void setId (int id)
 sets the id of the node in the graph be sure that the graph keeps consistent after changing the id
void setMarginalized (bool marginalized)
 true => this node should be marginalized out during the optimization
bool setMinimalEstimateData (const Buffer< g_type > &estimate)
 sets the initial estimate from an array of g_type.
bool setMinimalEstimateData (const g_type *estimate)
 sets the initial estimate from an array of g_type.
virtual g_type solveDirect (g_type lambda=0)=0
 updates the current vertex with the direct solution x += H_ii\b_ii
virtual int stackSize () const =0
 return the stack size
Public Member Functions inherited from HyperGraph::HGVertex
 HGVertex (int id=-1)
 creates a vertex having an ID specified by the argument
Buffer< HGEdge * > & edges ()
 returns the set of hyper-edges that are leaving/entering in this vertex
const Buffer< HGEdge * > & edges () const
 returns the set of hyper-edges that are leaving/entering in this vertex
int id () const
 returns the id
void setId (int newId)
 sets the id of this vertex

Protected Member Functions

virtual void oplusImpl (const g_type *v)=0
 update the position of the node from the parameters in v.
virtual bool setEstimateDataImpl (const g_type *)
 writes the estimater to an array of g_type
virtual bool setMinimalEstimateDataImpl (const g_type *)
 sets the initial estimate from an array of g_type

Protected Attributes

int _colInHessian = 0
 Column of this vertex in the Hessian matrix.
bool _fixed = false
 Whether this vertex is fixed during optimization.
int _hessianIndex = 0
 Index of this vertex in the Hessian.
bool _marginalized = false
 Whether this vertex is marginalized (Schur complement).
Protected Attributes inherited from HyperGraph::HGVertex
Buffer< HGEdge * > _edges
 Set of edges connected to this vertex.
int _id
 Unique identifier for this vertex.

Detailed Description

A general case Vertex for optimization.

Definition at line 97 of file optimizable_graph.h.

Member Function Documentation

◆ copyB()

virtual sint04 OptimizableGraph::OGVertex::copyB ( g_type * b_) const
pure virtual

◆ getEstimateData() [1/2]

virtual bool OptimizableGraph::OGVertex::getEstimateData ( Buffer< g_type > & estimate) const
inlinevirtual

writes the estimater to an array of g_type

Returns
true on success

Definition at line 181 of file optimizable_graph.h.

References estimateDimension(), and getEstimateData().

◆ getEstimateData() [2/2]

virtual bool OptimizableGraph::OGVertex::getEstimateData ( g_type * ) const
inlinevirtual

writes the estimater to an array of g_type

Returns
true on success

Definition at line 172 of file optimizable_graph.h.

Referenced by getEstimateData().

◆ getMinimalEstimateData() [1/2]

virtual bool OptimizableGraph::OGVertex::getMinimalEstimateData ( Buffer< g_type > & estimate) const
inlinevirtual

writes the estimate to an array of g_type

Returns
true on success

Definition at line 231 of file optimizable_graph.h.

References getMinimalEstimateData(), and minimalEstimateDimension().

◆ getMinimalEstimateData() [2/2]

virtual bool OptimizableGraph::OGVertex::getMinimalEstimateData ( g_type * ) const
inlinevirtual

writes the estimate to an array of g_type

Returns
true on success

Definition at line 222 of file optimizable_graph.h.

Referenced by getMinimalEstimateData().

◆ oplus()

void OptimizableGraph::OGVertex::oplus ( const g_type * v)
inline

Update the position of the node from the parameters in v.

Depends on the implementation of oplusImpl in derived classes to actually carry out the update. Will also call updateCache() to update the caches of depending on the vertex.

Definition at line 263 of file optimizable_graph.h.

References oplusImpl().

Referenced by BaseVertex< t_dims, T >::solveDirect(), and SparseOptimizer::update().

◆ oplusImpl()

virtual void OptimizableGraph::OGVertex::oplusImpl ( const g_type * v)
protectedpure virtual

update the position of the node from the parameters in v.

Implement in your class!

Implemented in VertexAccBias, VertexGDir, VertexGyroBias, VertexInvDepth, VertexPose4DoF, VertexPose, VertexSBAPointXYZ, VertexScale, VertexSE3Expmap, VertexSim3Expmap, and VertexVelocity.

Referenced by oplus().

◆ setEstimateData() [1/2]

bool OptimizableGraph::OGVertex::setEstimateData ( const Buffer< g_type > & estimate)
inline

sets the initial estimate from an array of g_type Implement setEstimateDataImpl()

Returns
true on success

Definition at line 160 of file optimizable_graph.h.

References estimateDimension(), and setEstimateData().

◆ setEstimateData() [2/2]

bool OptimizableGraph::OGVertex::setEstimateData ( const g_type * estimate)
inline

sets the initial estimate from an array of g_type Implement setEstimateDataImpl()

Returns
true on success

Definition at line 150 of file optimizable_graph.h.

References setEstimateDataImpl().

Referenced by setEstimateData().

◆ setEstimateDataImpl()

virtual bool OptimizableGraph::OGVertex::setEstimateDataImpl ( const g_type * )
inlineprotectedvirtual

writes the estimater to an array of g_type

Returns
true on success

Definition at line 312 of file optimizable_graph.h.

Referenced by setEstimateData().

◆ setMinimalEstimateData() [1/2]

bool OptimizableGraph::OGVertex::setMinimalEstimateData ( const Buffer< g_type > & estimate)
inline

sets the initial estimate from an array of g_type.

Implement setMinimalEstimateDataImpl()

Returns
true on success

Definition at line 210 of file optimizable_graph.h.

References minimalEstimateDimension(), and setMinimalEstimateData().

◆ setMinimalEstimateData() [2/2]

bool OptimizableGraph::OGVertex::setMinimalEstimateData ( const g_type * estimate)
inline

sets the initial estimate from an array of g_type.

Implement setMinimalEstimateDataImpl()

Returns
true on success

Definition at line 200 of file optimizable_graph.h.

References setMinimalEstimateDataImpl().

Referenced by setMinimalEstimateData().

◆ setMinimalEstimateDataImpl()

virtual bool OptimizableGraph::OGVertex::setMinimalEstimateDataImpl ( const g_type * )
inlineprotectedvirtual

sets the initial estimate from an array of g_type

Returns
true on success

Definition at line 318 of file optimizable_graph.h.

Referenced by setMinimalEstimateData().

◆ solveDirect()

virtual g_type OptimizableGraph::OGVertex::solveDirect ( g_type lambda = 0)
pure virtual

updates the current vertex with the direct solution x += H_ii\b_ii

Returns
the determinant of the inverted hessian

Implemented in BaseVertex< t_dims, T >, BaseVertex< 1, g_type >, BaseVertex< 1, InvDepthPoint >, BaseVertex< 2, GDirection >, BaseVertex< 4, ImuCamPose >, BaseVertex< 6, ImuCamPose >, BaseVertex< 6, SE3Quat >, and BaseVertex< 7, Sim3 >.


The documentation for this class was generated from the following file: