NDEVR
API Documentation
BaseUnaryEdge< t_dims, E, VertexXi >

Base class for edges connecting exactly one vertex (unary constraints). More...

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

Public Types

typedef BaseEdge< t_dims, E >::ErrorVector ErrorVector
 The error vector type.
typedef BaseEdge< t_dims, E >::InformationType InformationType
 The information matrix type.
typedef Eigen::Matrix< g_type, t_dims, VertexXiType::Dimension >::AlignedMapType JacobianXiOplusType
 Jacobian type w.r.t. the vertex.
typedef BaseEdge< t_dims, E >::Measurement Measurement
 The measurement type.
typedef VertexXi VertexXiType
 The vertex type.
Public Types inherited from BaseEdge< t_dims, E >
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

 BaseUnaryEdge ()
 Default constructor.
virtual bool allVerticesFixed () const final override
 Returns true if the single vertex is fixed.
void constructQuadraticForm ()
 Constructs the quadratic form (Hessian block and gradient) for this unary edge.
const JacobianXiOplusTypejacobianOplusXi () const
 returns the result of the linearization in the manifold space for the node xi
virtual void linearizeOplus ()
 Linearizes the oplus operator in the vertex, and stores the result in temporary variables _jacobianOplusXi and _jacobianOplusXj.
virtual void linearizeOplusAndConstructQuadraticForm (JacobianWorkspace &jacobianWorkspace) final override
 Linearizes the oplus operator and constructs the quadratic form.
virtual void mapHessianMemory (g_type *, int, int, bool) final override
 maps the internal matrix to some external memory location, you need to provide the memory before calling constructQuadraticForm
virtual void setVertex (uint04, HyperGraph::HGVertex *v) final override
 Sets the vertex, with type-checking.
virtual const HyperGraph::HGVertexvertex (uint04) const final override
 Returns a const pointer to the single vertex.
virtual HyperGraph::HGVertexvertex (uint04) final override
 Returns a mutable pointer to the single vertex.
virtual uint04 vertexCount () const final override
 Returns the number of vertices (always 1 for unary edges).
Public Member Functions inherited from BaseEdge< t_dims, E >
 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.
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
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

Protected Attributes

JacobianXiOplusType _jacobianOplusXi
 Jacobian of the error w.r.t. the vertex.
VertexXiTypem_vertex = nullptr
 Pointer to the connected vertex.
Protected Attributes inherited from BaseEdge< t_dims, E >
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

Additional Inherited Members

Static Public Attributes inherited from BaseEdge< t_dims, E >
static constexpr sint04 Dimension = t_dims
 Compile-time dimension of the error vector.
Protected Member Functions inherited from BaseEdge< t_dims, E >
InformationType robustInformation (const Eigen::Vector3< g_type > &rho) const
 calculate the robust information matrix by updating the information matrix of the error

Detailed Description

template<sint04 t_dims, typename E, typename VertexXi>
class BaseUnaryEdge< t_dims, E, VertexXi >

Base class for edges connecting exactly one vertex (unary constraints).

Template Parameters
t_dimsThe dimension of the error vector.
EThe measurement type.
VertexXiThe type of the connected vertex.

Definition at line 21 of file base_unary_edge.h.

Member Function Documentation

◆ linearizeOplusAndConstructQuadraticForm()

template<sint04 t_dims, typename E, typename VertexXi>
virtual void BaseUnaryEdge< t_dims, E, VertexXi >::linearizeOplusAndConstructQuadraticForm ( JacobianWorkspace & jacobianWorkspace)
inlinefinaloverridevirtual

Linearizes the oplus operator and constructs the quadratic form.

Parameters
[in]jacobianWorkspaceWorkspace for Jacobian computation.

Implements OptimizableGraph::OGEdge.

Definition at line 56 of file base_unary_edge.h.

References _jacobianOplusXi, constructQuadraticForm(), and linearizeOplus().

◆ mapHessianMemory()

template<sint04 t_dims, typename E, typename VertexXi>
virtual void BaseUnaryEdge< t_dims, E, VertexXi >::mapHessianMemory ( g_type * d,
int i,
int j,
bool rowMajor )
inlinefinaloverridevirtual

maps the internal matrix to some external memory location, you need to provide the memory before calling constructQuadraticForm

Parameters
dthe memory location to which we map
iindex of the vertex i
jindex of the vertex j (j > i, upper triangular fashion)
rowMajorif true, will write in rowMajor order to the block. Since EIGEN is columnMajor by default, this results in writing the transposed

Implements OptimizableGraph::OGEdge.

Definition at line 189 of file base_unary_edge.h.

◆ setVertex()

template<sint04 t_dims, typename E, typename VertexXi>
virtual void BaseUnaryEdge< t_dims, E, VertexXi >::setVertex ( uint04 ,
HyperGraph::HGVertex * v )
inlinefinaloverridevirtual

Sets the vertex, with type-checking.

Parameters
[in]vThe vertex pointer to assign.

Implements HyperGraph::HGEdge.

Definition at line 43 of file base_unary_edge.h.

References cast(), and m_vertex.


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