g2o
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Types | Protected Attributes | List of all members
g2o::EstimateAccessorGet< Edge > Class Template Reference

#include <auto_differentiation.h>

Collaboration diagram for g2o::EstimateAccessorGet< Edge >:
Collaboration graph
[legend]

Classes

struct  BufferType
 
struct  BufferType< std::index_sequence< Ints... > >
 

Public Member Functions

template<int k>
EIGEN_STRONG_INLINE double * data (Edge *that)
 

Protected Types

using Buffer = typename BufferType< std::make_index_sequence< Edge::_nr_of_vertices > >::type
 

Protected Attributes

Buffer _estimateBuffer
 

Detailed Description

template<typename Edge>
class g2o::EstimateAccessorGet< Edge >

functor to access the estimate pointer by the getEstimateData() function that can be implemented in vertex types. Downside is that we have to buffer the data. In such a case, Edge::computeError is most likely implemented on own types and Edge::operator() has to be re-implemented consuming pointers to obtain the error for linearizing. See the implementation of EdgeSE2AD in unit_test/general/auto_diff.cpp

Definition at line 63 of file auto_differentiation.h.

Member Typedef Documentation

◆ Buffer

template<typename Edge >
using g2o::EstimateAccessorGet< Edge >::Buffer = typename BufferType< std::make_index_sequence<Edge::_nr_of_vertices> >::type
protected

Definition at line 84 of file auto_differentiation.h.

Member Function Documentation

◆ data()

template<typename Edge >
template<int k>
EIGEN_STRONG_INLINE double * g2o::EstimateAccessorGet< Edge >::data ( Edge *  that)
inline

Definition at line 66 of file auto_differentiation.h.

66 {
67 auto& buffer = std::get<k>(_estimateBuffer);
68 buffer.resize(that->template vertexDimension<k>());
69 double* rawBuffer = const_cast<double*>(buffer.data());
70 bool gotData = that->template vertexXn<k>()->getEstimateData(rawBuffer);
71 assert(gotData && "Called getEstimateData, but seems unimplmented");
72 return gotData ? rawBuffer : nullptr;
73 }

References g2o::EstimateAccessorGet< Edge >::_estimateBuffer.

Member Data Documentation

◆ _estimateBuffer

template<typename Edge >
Buffer g2o::EstimateAccessorGet< Edge >::_estimateBuffer
protected

Definition at line 86 of file auto_differentiation.h.

Referenced by g2o::EstimateAccessorGet< Edge >::data().


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