61 typedef typename std::shared_ptr<GaussMarkov1stOrderFactor>
shared_ptr;
78 std::cout << s <<
"GaussMarkov1stOrderFactor(" 79 << keyFormatter(this->
key1()) <<
"," 80 << keyFormatter(this->
key2()) <<
")\n";
86 const This *
e =
dynamic_cast<const This*
> (&
expected);
100 Vector alpha_v1(tau_.size());
101 for(
int i=0;
i<tau_.size();
i++){
108 if(H1) *H1 = -1 *
alpha.asDiagonal();
109 if(H2) *H2 = Matrix::Identity(v2.size(),v2.size());
116 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 118 friend class boost::serialization::access;
119 template<
class ARCHIVE>
120 void serialize(ARCHIVE & ar,
const unsigned int ) {
121 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
122 ar & BOOST_SERIALIZATION_NVP(dt_);
123 ar & BOOST_SERIALIZATION_NVP(tau_);
141 public Testable<GaussMarkov1stOrderFactor<VALUE> > {
Concept check for values that can be used in unit tests.
std::string serialize(const T &input)
serializes to a string
noiseModel::Diagonal::shared_ptr model
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
A factor with a quadratic error function - a Gaussian.
SharedGaussian calcDiscreteNoiseModel(const SharedGaussian &model, double delta_t)
static const KeyFormatter DefaultKeyFormatter
void print(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
Matrix * OptionalMatrixType
GaussMarkov1stOrderFactor< VALUE > This
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
Array< double, 1, 3 > e(1./3., 0.5, 2.)
NoiseModelFactorN< VALUE, VALUE > Base
std::shared_ptr< GaussMarkov1stOrderFactor > shared_ptr
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Base class and basic functions for Lie types.
SharedNoiseModel noiseModel_
Non-linear factor base classes.
~GaussMarkov1stOrderFactor() override
GaussMarkov1stOrderFactor(const Key &key1, const Key &key2, double delta_t, Vector tau, const SharedGaussian &model)
Vector evaluateError(const VALUE &p1, const VALUE &p2, OptionalMatrixType H1, OptionalMatrixType H2) const override
Jet< T, N > sqrt(const Jet< T, N > &f)
static shared_ptr SqrtInformation(const Matrix &R, bool smart=true)
std::shared_ptr< Gaussian > shared_ptr
GaussMarkov1stOrderFactor()
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Gaussian::shared_ptr SharedGaussian