g2o
Public Member Functions | Public Attributes | List of all members
g2o::VertexSegment2D Class Reference

#include <vertex_segment2d.h>

Inheritance diagram for g2o::VertexSegment2D:
Inheritance graph
[legend]
Collaboration diagram for g2o::VertexSegment2D:
Collaboration graph
[legend]

Public Member Functions

 VertexSegment2D ()
 
Vector2D estimateP1 () const
 
Vector2D estimateP2 () const
 
void setEstimateP1 (const Vector2D &p1)
 
void setEstimateP2 (const Vector2D &p2)
 
virtual void setToOriginImpl ()
 sets the node to the origin (used in the multilevel stuff) More...
 
virtual bool setEstimateDataImpl (const double *est)
 
virtual bool getEstimateData (double *est) const
 
virtual int estimateDimension () const
 
virtual bool setMinimalEstimateDataImpl (const double *est)
 
virtual bool getMinimalEstimateData (double *est) const
 
virtual int minimalEstimateDimension () const
 
virtual void oplusImpl (const double *update)
 
virtual bool read (std::istream &is)
 read the vertex from a stream, i.e., the internal state of the vertex More...
 
virtual bool write (std::ostream &os) const
 write the vertex to a stream More...
 
- Public Member Functions inherited from g2o::BaseVertex< 4, Vector4D >
 BaseVertex ()
 
virtual const double & hessian (int i, int j) const
 get the element from the hessian matrix More...
 
virtual double & hessian (int i, int j)
 
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 More...
 
virtual double & b (int i)
 
Eigen::Matrix< double, D, 1, Eigen::ColMajor > & b ()
 return right hand side b of the constructed linear system More...
 
const Eigen::Matrix< double, D, 1, Eigen::ColMajor > & b () const
 
virtual double * bData ()
 return a pointer to the b vector associated with this vertex More...
 
virtual void clearQuadraticForm ()
 
virtual double solveDirect (double lambda=0)
 
HessianBlockTypeA ()
 return the hessian block associated with the vertex More...
 
const HessianBlockTypeA () const
 
virtual void push ()
 backup the position of the vertex to a stack More...
 
virtual void pop ()
 restore the position of the vertex by retrieving the position from the stack More...
 
virtual void discardTop ()
 pop the last element from the stack, without restoring the current estimate More...
 
virtual int stackSize () const
 return the stack size More...
 
const EstimateTypeestimate () const
 return the current estimate of the vertex More...
 
void setEstimate (const EstimateType &et)
 set the estimate for the vertex also calls updateCache() More...
 
- Public Member Functions inherited from g2o::OptimizableGraph::Vertex
 Vertex ()
 
virtual Vertexclone () const
 returns a deep copy of the current vertex More...
 
virtual ~Vertex ()
 
void setToOrigin ()
 sets the node to the origin (used in the multilevel stuff) More...
 
bool setEstimateData (const double *estimate)
 
bool setEstimateData (const std::vector< double > &estimate)
 
virtual bool getEstimateData (std::vector< double > &estimate) const
 
bool setMinimalEstimateData (const double *estimate)
 
bool setMinimalEstimateData (const std::vector< double > &estimate)
 
virtual bool getMinimalEstimateData (std::vector< double > &estimate) const
 
void oplus (const double *v)
 
int hessianIndex () const
 temporary index of this node in the parameter vector obtained from linearization More...
 
int G2O_ATTRIBUTE_DEPRECATED (tempIndex() const)
 
void setHessianIndex (int ti)
 set the temporary index of the vertex in the parameter blocks More...
 
void G2O_ATTRIBUTE_DEPRECATED (setTempIndex(int ti))
 
bool fixed () const
 true => this node is fixed during the optimization More...
 
void setFixed (bool fixed)
 true => this node should be considered fixed during the optimization More...
 
bool marginalized () const
 true => this node is marginalized out during the optimization More...
 
void setMarginalized (bool marginalized)
 true => this node should be marginalized out during the optimization More...
 
int dimension () const
 dimension of the estimated state belonging to this node More...
 
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 More...
 
void setColInHessian (int c)
 set the row of this vertex in the Hessian More...
 
int colInHessian () const
 get the row of this vertex in the Hessian More...
 
const OptimizableGraphgraph () const
 
OptimizableGraphgraph ()
 
void lockQuadraticForm ()
 
void unlockQuadraticForm ()
 
virtual void updateCache ()
 
CacheContainercacheContainer ()
 
- Public Member Functions inherited from g2o::HyperGraph::Vertex
 Vertex (int id=InvalidId)
 creates a vertex having an ID specified by the argument More...
 
int id () const
 returns the id More...
 
const EdgeSetedges () const
 returns the set of hyper-edges that are leaving/entering in this vertex More...
 
EdgeSetedges ()
 returns the set of hyper-edges that are leaving/entering in this vertex More...
 
virtual HyperGraphElementType elementType () const
 
- Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement
virtual ~HyperGraphElement ()
 
HyperGraphElementclone () const
 
- Public Member Functions inherited from g2o::HyperGraph::DataContainer
 DataContainer ()
 
virtual ~DataContainer ()
 
const DatauserData () const
 the user data associated with this vertex More...
 
DatauserData ()
 
void setUserData (Data *obs)
 
void addUserData (Data *obs)
 

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 

Additional Inherited Members

- Public Types inherited from g2o::BaseVertex< 4, Vector4D >
typedef Vector4D EstimateType
 
typedef std::stack< EstimateType, std::vector< EstimateType, Eigen::aligned_allocator< EstimateType > > > BackupStackType
 
typedef Eigen::Map< Eigen::Matrix< double, D, D, Eigen::ColMajor >, Eigen::Matrix< double, D, D, Eigen::ColMajor >::Flags &Eigen::AlignedBit?Eigen::Aligned:Eigen::Unaligned > HessianBlockType
 
- Static Public Attributes inherited from g2o::BaseVertex< 4, Vector4D >
static const int Dimension
 dimension of the estimate (minimal) in the manifold space More...
 
- Protected Attributes inherited from g2o::BaseVertex< 4, Vector4D >
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

Definition at line 39 of file vertex_segment2d.h.

Constructor & Destructor Documentation

g2o::VertexSegment2D::VertexSegment2D ( )

Definition at line 43 of file vertex_segment2d.cpp.

References g2o::BaseVertex< 4, Vector4D >::_estimate.

43  :
44  BaseVertex<4, Vector4D>()
45  {
46  _estimate.setZero();
47  }

Member Function Documentation

virtual int g2o::VertexSegment2D::estimateDimension ( ) const
inlinevirtual

returns the dimension of the extended representation used by get/setEstimate(double*) -1 if it is not supported

Reimplemented from g2o::OptimizableGraph::Vertex.

Definition at line 66 of file vertex_segment2d.h.

66  {
67  return 4;
68  }
Vector2D g2o::VertexSegment2D::estimateP1 ( ) const
inline
Vector2D g2o::VertexSegment2D::estimateP2 ( ) const
inline
virtual bool g2o::VertexSegment2D::getEstimateData ( double *  estimate) const
inlinevirtual

writes the estimater to an array of double

Returns
true on success

Reimplemented from g2o::OptimizableGraph::Vertex.

Definition at line 60 of file vertex_segment2d.h.

60  {
61  Eigen::Map<Vector4D> v(est);
62  v = _estimate;
63  return true;
64  }
virtual bool g2o::VertexSegment2D::getMinimalEstimateData ( double *  estimate) const
inlinevirtual

writes the estimate to an array of double

Returns
true on success

Reimplemented from g2o::OptimizableGraph::Vertex.

Definition at line 74 of file vertex_segment2d.h.

74  {
75  return getEstimateData(est);
76  }
virtual bool getEstimateData(double *est) const
virtual int g2o::VertexSegment2D::minimalEstimateDimension ( ) const
inlinevirtual

returns the dimension of the extended representation used by get/setEstimate(double*) -1 if it is not supported

Reimplemented from g2o::OptimizableGraph::Vertex.

Definition at line 78 of file vertex_segment2d.h.

78  {
79  return 4;
80  }
virtual void g2o::VertexSegment2D::oplusImpl ( const double *  v)
inlinevirtual

update the position of the node from the parameters in v. Implement in your class!

Implements g2o::OptimizableGraph::Vertex.

Definition at line 82 of file vertex_segment2d.h.

83  {
84  Eigen::Map<const Vector4D> upd(update);
85  _estimate += upd;
86  }
bool g2o::VertexSegment2D::read ( std::istream &  is)
virtual

read the vertex from a stream, i.e., the internal state of the vertex

Implements g2o::OptimizableGraph::Vertex.

Definition at line 49 of file vertex_segment2d.cpp.

References g2o::BaseVertex< 4, Vector4D >::_estimate.

50  {
51  for (size_t i=0; i<4; i++)
52  is >> _estimate[i];
53  return true;
54  }
virtual bool g2o::VertexSegment2D::setEstimateDataImpl ( const double *  )
inlinevirtual

writes the estimater to an array of double

Returns
true on success

Reimplemented from g2o::OptimizableGraph::Vertex.

Definition at line 54 of file vertex_segment2d.h.

54  {
55  Eigen::Map<const Vector4D> v(est);
56  _estimate = v;
57  return true;
58  }
void g2o::VertexSegment2D::setEstimateP1 ( const Vector2D p1)
inline

Definition at line 47 of file vertex_segment2d.h.

Referenced by g2o::EdgeSE2Segment2D::initialEstimate().

47 { Eigen::Map<Vector2D> v(&_estimate[0]); v=p1; }
void g2o::VertexSegment2D::setEstimateP2 ( const Vector2D p2)
inline

Definition at line 48 of file vertex_segment2d.h.

Referenced by g2o::EdgeSE2Segment2D::initialEstimate().

48 { Eigen::Map<Vector2D> v(&_estimate[2]); v=p2; }
virtual bool g2o::VertexSegment2D::setMinimalEstimateDataImpl ( const double *  )
inlinevirtual

sets the initial estimate from an array of double

Returns
true on success

Reimplemented from g2o::OptimizableGraph::Vertex.

Definition at line 70 of file vertex_segment2d.h.

70  {
71  return setEstimateData(est);
72  }
bool setEstimateData(const double *estimate)
virtual void g2o::VertexSegment2D::setToOriginImpl ( )
inlinevirtual

sets the node to the origin (used in the multilevel stuff)

Implements g2o::OptimizableGraph::Vertex.

Definition at line 50 of file vertex_segment2d.h.

50  {
51  _estimate.setZero();
52  }
bool g2o::VertexSegment2D::write ( std::ostream &  os) const
virtual

write the vertex to a stream

Implements g2o::OptimizableGraph::Vertex.

Definition at line 56 of file vertex_segment2d.cpp.

References g2o::BaseVertex< 4, Vector4D >::_estimate.

57  {
58  for (size_t i=0; i<4; i++)
59  os << _estimate[i] << " ";
60  return os.good();
61  }

Member Data Documentation

g2o::VertexSegment2D::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 42 of file vertex_segment2d.h.


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