27#ifndef G2O_BASE_EDGE_H
28#define G2O_BASE_EDGE_H
46 _vertex.lockQuadraticForm();
68 typedef Eigen::Matrix<double, D, 1, Eigen::ColMajor>
ErrorVector;
78 typedef Eigen::Matrix<double, Eigen::Dynamic, 1, Eigen::ColMajor>
ErrorVector;
79 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>
85template <
int D,
typename E>
129 "inititialEstimate() is not implemented, please give implementation in "
130 "your derived class");
138 template <
int Dim = D>
174 for (
int i = 0; i <
information().rows() && is.good(); ++i)
175 for (
int j = i; j <
information().cols() && is.good(); ++j) {
179 return is.good() || is.eof();
193 return is.good() || is.eof();
197 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
bool writeInformationMatrix(std::ostream &os) const
write the upper trinagular part of the information matrix into the stream
bool readInformationMatrix(std::istream &is)
virtual void initialEstimate(const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
bool readParamIds(std::istream &is)
reads the param IDs from the stream
EIGEN_STRONG_INLINE const Measurement & measurement() const
accessor functions for the measurement represented by the edge
EIGEN_STRONG_INLINE InformationType & information()
virtual void setMeasurement(const Measurement &m)
InformationType _information
BaseEdge & operator=(const BaseEdge &)=delete
virtual double * errorData()
EIGEN_STRONG_INLINE const InformationType & information() const
information matrix of the constraint
virtual double chi2() const
internal::BaseEdgeTraits< D >::ErrorVector ErrorVector
virtual const double * errorData() const
returns the error vector cached after calling the computeError;
void setInformation(const InformationType &information)
virtual double * informationData()
internal::BaseEdgeTraits< D >::InformationType InformationType
virtual const double * informationData() const
const ErrorVector & error() const
bool writeParamIds(std::ostream &os) const
write the param IDs that are potentially used by the edge
BaseEdge(const BaseEdge &)=delete
static constexpr int Dimension
InformationType robustInformation(const Vector3 &rho) const
std::enable_if< Dim==-1, void >::type setDimension(int dim)
Measurement _measurement
the measurement of the edge
std::set< Vertex * > VertexSet
std::vector< int > _parameterIds
bool setParameterId(int argNum, int paramId)
size_t numParameters() const
A general case Vertex for optimization.
Eigen::Matrix< double, Eigen::Dynamic, 1, Eigen::ColMajor > ErrorVector
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > InformationType
Eigen::Matrix< double, D, 1, Eigen::ColMajor > ErrorVector
Eigen::Matrix< double, D, D, Eigen::ColMajor > InformationType
static constexpr int Dimension