39 #ifndef INCLUDE_OKVIS_CERES_PARAMETERBLOCK_HPP_
40 #define INCLUDE_OKVIS_CERES_PARAMETERBLOCK_HPP_
45 #include "ceres/ceres.h"
120 virtual void plus(
const double* x0,
const double* Delta_Chi,
121 double* x0_plus_Delta)
const = 0;
126 virtual void plusJacobian(
const double* x0,
double* jacobian)
const = 0;
133 virtual void minus(
const double* x0,
const double* x0_plus_Delta,
134 double* Delta_Chi)
const = 0;
140 virtual void liftJacobian(
const double* x0,
double* jacobian)
const = 0;
160 virtual std::string
typeInfo()
const = 0;
virtual void minus(const double *x0, const double *x0_plus_Delta, double *Delta_Chi) const =0
Computes the minimal difference between a variable x and a perturbed variable x_plus_delta.
virtual void plus(const double *x0, const double *Delta_Chi, double *x0_plus_Delta) const =0
Generalization of the addition operation, x_plus_delta = Plus(x, delta) with the condition that Plus(...
virtual size_t dimension() const =0
Get the dimension of the parameter block.
virtual ~ParameterBlock()
Trivial destructor.
Definition: ParameterBlock.hpp:64
virtual void plusJacobian(const double *x0, double *jacobian) const =0
The jacobian of Plus(x, delta) w.r.t delta at delta = 0.
const ::ceres::LocalParameterization * localParameterizationPtr_
The local parameterisation object to use.
Definition: ParameterBlock.hpp:168
virtual std::string typeInfo() const =0
Return parameter block type as string.
virtual void setLocalParameterizationPtr(const ::ceres::LocalParameterization *localParameterizationPtr)
Set which local parameterisation object to use.
Definition: ParameterBlock.hpp:148
ParameterBlock()
Default constructor, assumes not fixed and no local parameterisation.
Definition: ParameterBlock.hpp:57
uint64_t id() const
Get parameter block ID.
Definition: ParameterBlock.hpp:98
virtual double * parameters()=0
Get parameter values.
uint64_t id_
ID of the parameter block.
Definition: ParameterBlock.hpp:164
virtual size_t minimalDimension() const =0
The dimension of the internal parameterisation (minimal representation).
bool fixed() const
Whether or not this is optimised at all.
Definition: ParameterBlock.hpp:108
virtual void setParameters(const double *parameters)=0
Directly set values of this parameter block.
virtual void liftJacobian(const double *x0, double *jacobian) const =0
Computes the Jacobian from minimal space to naively overparameterised space as used by ceres...
void setId(uint64_t id)
Set parameter block ID.
Definition: ParameterBlock.hpp:72
void setFixed(bool fixed)
Whether or not this should be optimised at all.
Definition: ParameterBlock.hpp:82
virtual const ::ceres::LocalParameterization * localParameterizationPtr() const
The local parameterisation object to use.
Definition: ParameterBlock.hpp:155
bool fixed_
Whether or not this should be optimised at all (ceres::problem::setFixed)
Definition: ParameterBlock.hpp:166
Base class providing the interface for parameter blocks.
Definition: ParameterBlock.hpp:53