NDEVR
API Documentation
BaseEdge< t_dims, E >

Base class for edges with a fixed-size error vector and measurement type. More...

Inheritance diagram for BaseEdge< t_dims, E >:
[legend]
Collaboration diagram for BaseEdge< t_dims, E >:
[legend]

Public Types

typedef Eigen::Matrix< g_type, t_dims, 1 > ErrorVector
 Fixed-size error vector type.
typedef Eigen::Matrix< g_type, t_dims, t_dims > InformationType
 Fixed-size information (inverse covariance) matrix type.
typedef E Measurement
 The measurement type stored by this edge.

Public Member Functions

 BaseEdge ()
 Default constructor.
g_type chi2 () const final override
 Computes the chi-squared error: e^T * Omega * e.
virtual sint04 dimension () const final override
 Returns the dimension of the error vector.
const ErrorVectorerror () const
 Returns a const reference to the error vector.
const InformationTypeinformation () const
 Returns a const reference to the information matrix.
const g_type * informationData () const final override
 Returns a const pointer to the raw information matrix data.
g_type * informationData () final override
 Returns a mutable pointer to the raw information matrix data.
const Measurementmeasurement () const
 accessor functions for the measurement represented by the edge
int rank () const
 Returns the rank (dimension) of the error.
g_type scalerInformation () const
 information matrix of the constraint
void setInformation (const InformationType &information)
 Sets the information matrix.
void setInformation (g_type information)
 Sets the information matrix to a scaled identity.
void setMeasurement (const Measurement &m)
 Sets the measurement for this edge.
Public Member Functions inherited from OptimizableGraph::OGEdge
 OGEdge ()
 Default constructor.
virtual bool allVerticesFixed () const =0
 Returns true if all vertices connected to this edge are fixed.
void clearRobustKernel ()
 Removes the robust kernel from this edge.
virtual void computeError ()=0
 Computes the error of the edge and stores it internally.
long long internalId () const
 the internal ID of the edge
int level () const
 returns the level of the edge
virtual void linearizeOplusAndConstructQuadraticForm (JacobianWorkspace &jacobianWorkspace)=0
 Linearizes the constraint in the edge in the manifold space, and store the result in the given workspace and Linearizes the constraint in the edge.
virtual void mapHessianMemory (g_type *d, int i, int j, bool rowMajor)=0
 maps the internal matrix to some external memory location, you need to provide the memory before calling constructQuadraticForm
RobustKernelrobustKernel () const
 if NOT NULL, error of this edge will be robustifed with the kernel
void setLevel (int l)
 sets the level of the edge
void setRobustKernel (RobustKernel &ptr)
 specify the robust kernel to be used in this edge
Public Member Functions inherited from HyperGraph::HGEdge
 HGEdge (int id=-1)
 creates and empty edge with no vertices
int id () const
 returns the id of this edge
void setId (int id)
 sets the id of this edge
virtual void setVertex (uint04 i, HGVertex *v)=0
 Sets the i-th vertex of this edge.
virtual const HGVertexvertex (uint04 i) const =0
 Returns a const pointer to the i-th vertex.
virtual HGVertexvertex (uint04 i)=0
 Returns a mutable pointer to the i-th vertex.
virtual uint04 vertexCount () const =0
 Returns the number of vertices connected by this edge.

Static Public Attributes

static constexpr sint04 Dimension = t_dims
 Compile-time dimension of the error vector.

Protected Member Functions

InformationType robustInformation (const Eigen::Vector3< g_type > &rho) const
 calculate the robust information matrix by updating the information matrix of the error

Protected Attributes

ErrorVector _error
 The current error vector.
InformationType _information
 The information (inverse covariance) matrix.
Measurement _measurement
 The stored measurement for this edge.
Protected Attributes inherited from OptimizableGraph::OGEdge
int _internalId = 0
 Internal sequential id assigned on insertion.
int _level = 0
 Optimization level for multi-level optimization.
RobustKernel_robustKernel = nullptr
 Optional robust kernel for this edge.
Protected Attributes inherited from HyperGraph::HGEdge
int _id
 unique id

Detailed Description

template<sint04 t_dims, typename E>
class BaseEdge< t_dims, E >

Base class for edges with a fixed-size error vector and measurement type.

Template Parameters
t_dimsThe dimension of the error / measurement space.
EThe measurement type.

Definition at line 16 of file base_edge.h.

Member Function Documentation

◆ chi2()

template<sint04 t_dims, typename E>
g_type BaseEdge< t_dims, E >::chi2 ( ) const
inlinefinaloverridevirtual

Computes the chi-squared error: e^T * Omega * e.

Returns
The weighted squared error.

Implements OptimizableGraph::OGEdge.

Definition at line 37 of file base_edge.h.

Referenced by BaseMultiEdge< t_dims, E >::constructQuadraticForm(), and BaseUnaryEdge< t_dims, E, VertexXi >::constructQuadraticForm().

◆ dimension()

template<sint04 t_dims, typename E>
virtual sint04 BaseEdge< t_dims, E >::dimension ( ) const
inlinefinaloverridevirtual

Returns the dimension of the error vector.

Returns
The compile-time dimension t_dims.

Implements OptimizableGraph::OGEdge.

Definition at line 30 of file base_edge.h.

◆ rank()

template<sint04 t_dims, typename E>
int BaseEdge< t_dims, E >::rank ( ) const
inline

Returns the rank (dimension) of the error.

Returns
t_dims.

Definition at line 71 of file base_edge.h.

◆ scalerInformation()

template<sint04 t_dims, typename E>
g_type BaseEdge< t_dims, E >::scalerInformation ( ) const
inline

information matrix of the constraint

Returns the first element of the information matrix as a scalar.

Definition at line 48 of file base_edge.h.

◆ setInformation() [1/2]

template<sint04 t_dims, typename E>
void BaseEdge< t_dims, E >::setInformation ( const InformationType & information)
inline

Sets the information matrix.

Parameters
[in]informationThe new information matrix.

Definition at line 53 of file base_edge.h.

◆ setInformation() [2/2]

template<sint04 t_dims, typename E>
void BaseEdge< t_dims, E >::setInformation ( g_type information)
inline

Sets the information matrix to a scaled identity.

Parameters
[in]informationThe scalar weight for the identity matrix.

Definition at line 56 of file base_edge.h.

◆ setMeasurement()

template<sint04 t_dims, typename E>
void BaseEdge< t_dims, E >::setMeasurement ( const Measurement & m)
inline

Sets the measurement for this edge.

Parameters
[in]mThe measurement to store.

Definition at line 67 of file base_edge.h.


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