g2o
Loading...
Searching...
No Matches
g2o::BaseDynamicVertex< T > Class Template Referenceabstract

#include <base_dynamic_vertex.h>

Inheritance diagram for g2o::BaseDynamicVertex< T >:
Collaboration diagram for g2o::BaseDynamicVertex< T >:

Public Member Functions

virtual bool setDimension (int newDimension)
Public Member Functions inherited from g2o::BaseVertex<-1, T >
 BaseVertex ()
BaseVertex & operator= (const BaseVertex &)=delete
virtual const double & hessian (int i, int j) const
 get the element from the hessian matrix
virtual double hessianDeterminant () const
virtual double * hessianData ()
virtual void mapHessianMemory (double *d)
virtual int copyB (double *b_) const
virtual const double & b (int i) const
 get the b vector element
virtual double * bData ()
 return a pointer to the b vector associated with this vertex
virtual void clearQuadraticForm ()
virtual double solveDirect (double lambda=0)
HessianBlockType & A ()
 return the hessian block associated with the vertex
virtual void push ()
 backup the position of the vertex to a stack
virtual void pop ()
virtual void discardTop ()
virtual int stackSize () const
 return the stack size
const EstimateType & estimate () const
 return the current estimate of the vertex
void setEstimate (const EstimateType &et)
 set the estimate for the vertex also calls updateCache()
Public Member Functions inherited from g2o::OptimizableGraph::Vertex
 Vertex ()
virtual ~Vertex ()
void setToOrigin ()
 sets the node to the origin (used in the multilevel stuff)
virtual double & hessian (int i, int j)=0
virtual double & b (int i)=0
bool setEstimateData (const double *estimate)
bool setEstimateData (const std::vector< double > &estimate)
template<typename Derived>
bool setEstimateData (const Eigen::MatrixBase< Derived > &estimate)
virtual bool getEstimateData (double *estimate) const
virtual bool getEstimateData (std::vector< double > &estimate) const
template<typename Derived>
bool getEstimateData (Eigen::MatrixBase< Derived > &estimate) const
virtual int estimateDimension () const
bool setMinimalEstimateData (const double *estimate)
bool setMinimalEstimateData (const std::vector< double > &estimate)
template<typename Derived>
bool setMinimalEstimateData (const Eigen::MatrixBase< Derived > &estimate)
virtual bool getMinimalEstimateData (double *estimate) const
virtual bool getMinimalEstimateData (std::vector< double > &estimate) const
template<typename Derived>
bool getMinimalEstimateData (Eigen::MatrixBase< Derived > &estimate) const
virtual int minimalEstimateDimension () const
void oplus (const double *v)
int hessianIndex () const
int G2O_ATTRIBUTE_DEPRECATED (tempIndex() const)
void setHessianIndex (int ti)
 set the temporary index of the vertex in the parameter blocks
void G2O_ATTRIBUTE_DEPRECATED (setTempIndex(int ti))
bool fixed () const
 true => this node is fixed during the optimization
void setFixed (bool fixed)
 true => this node should be considered fixed during the optimization
bool marginalized () const
 true => this node is marginalized out during the optimization
void setMarginalized (bool marginalized)
 true => this node should be marginalized out during the optimization
int dimension () const
 dimension of the estimated state belonging to this node
virtual void setId (int id)
void setColInHessian (int c)
 set the row of this vertex in the Hessian
int colInHessian () const
 get the row of this vertex in the Hessian
const OptimizableGraph * graph () const
OptimizableGraph * graph ()
void lockQuadraticForm ()
void unlockQuadraticForm ()
virtual bool read (std::istream &is)=0
 read the vertex from a stream, i.e., the internal state of the vertex
virtual bool write (std::ostream &os) const =0
 write the vertex to a stream
virtual void updateCache ()
CacheContainer * cacheContainer ()
Public Member Functions inherited from g2o::HyperGraph::Vertex
 Vertex (int id=InvalidId)
 creates a vertex having an ID specified by the argument
int id () const
 returns the id
const EdgeSet & edges () const
 returns the set of hyper-edges that are leaving/entering in this vertex
EdgeSet & edges ()
 returns the set of hyper-edges that are leaving/entering in this vertex
virtual HyperGraphElementType elementType () const
Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement
virtual ~HyperGraphElement ()
Public Member Functions inherited from g2o::HyperGraph::DataContainer
 DataContainer ()
virtual ~DataContainer ()
const Data * userData () const
 the user data associated with this vertex
Data * userData ()
void setUserData (Data *obs)
void addUserData (Data *obs)

Protected Member Functions

virtual bool setDimensionImpl (int newDimension)=0
Protected Member Functions inherited from g2o::OptimizableGraph::Vertex
virtual void oplusImpl (const double *v)=0
virtual void setToOriginImpl ()=0
 sets the node to the origin (used in the multilevel stuff)
virtual bool setEstimateDataImpl (const double *)
virtual bool setMinimalEstimateDataImpl (const double *)

Additional Inherited Members

Public Types inherited from g2o::BaseVertex<-1, T >
using EstimateType
using BackupStackType
using HessianBlockType
Static Public Attributes inherited from g2o::BaseVertex<-1, T >
static const int Dimension
 dimension of the estimate (minimal) in the manifold space
Protected Attributes inherited from g2o::BaseVertex<-1, T >
HessianBlockType _hessian
Eigen::Matrix< double, D, 1, Eigen::ColMajor > _b
EstimateType _estimate
BackupStackType _backup
Protected Attributes inherited from g2o::OptimizableGraph::Vertex
OptimizableGraph * _graph
Data * _userData
int _hessianIndex
bool _fixed
bool _marginalized
int _dimension
int _colInHessian
OpenMPMutex _quadraticFormMutex
CacheContainer * _cacheContainer
Protected Attributes inherited from g2o::HyperGraph::Vertex
int _id
EdgeSet _edges
Protected Attributes inherited from g2o::HyperGraph::DataContainer
Data * _userData

Detailed Description

template<typename T>
class g2o::BaseDynamicVertex< T >

Definition at line 36 of file base_dynamic_vertex.h.

Member Function Documentation

◆ setDimension()

template<typename T>
bool g2o::BaseDynamicVertex< T >::setDimension ( int newDimension)
inlinevirtual

Definition at line 54 of file base_dynamic_vertex.h.

54 {
55 // Check the dimension is non-negative.
56 assert(newDimension >= 0);
57 if (newDimension < 0) return false;
58
59 // Nothing to do if the dimension is unchanged.
60 if (newDimension == _dimension) return true;
61
62 // Change the state to the requested dimension
63 if (setDimensionImpl(newDimension) == false) return false;
64
65 // Store the old dimension and assign the new
68
69 // Reset the allocation associated with this vertex and update the cache
71 mapHessianMemory(nullptr);
72 _b.resize(_dimension);
74
75 // If the dimension is being increased and this vertex is in a
76 // graph, update the size of the Jacobian workspace just in case it
77 // needs to grow.
78 if ((newDimension > oldDimension) && (_graph != nullptr)) {
79 JacobianWorkspace& jacobianWorkspace = _graph->jacobianWorkspace();
80 for (auto e : _edges) jacobianWorkspace.updateSize(e);
81 }
82
83 return true;
84}
virtual bool setDimensionImpl(int newDimension)=0
Eigen::Matrix< double, D, 1, Eigen::ColMajor > _b
virtual void mapHessianMemory(double *d)
Definition base_vertex.h:54
void setHessianIndex(int ti)
set the temporary index of the vertex in the parameter blocks

References g2o::BaseVertex<-1, T >::_b, g2o::OptimizableGraph::Vertex::_dimension, g2o::HyperGraph::Vertex::_edges, g2o::OptimizableGraph::Vertex::_graph, g2o::BaseVertex<-1, T >::mapHessianMemory(), setDimensionImpl(), g2o::OptimizableGraph::Vertex::setHessianIndex(), g2o::OptimizableGraph::Vertex::updateCache(), and g2o::JacobianWorkspace::updateSize().

Referenced by main().

◆ setDimensionImpl()


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