58 typedef typename boost::shared_ptr<GaussMarkov1stOrderFactor>
shared_ptr;
75 std::cout << s <<
"GaussMarkov1stOrderFactor(" 76 << keyFormatter(this->
key1()) <<
"," 77 << keyFormatter(this->
key2()) <<
")\n";
83 const This *
e =
dynamic_cast<const This*
> (&
expected);
91 boost::optional<Matrix&> H1 = boost::none,
92 boost::optional<Matrix&> H2 = boost::none)
const override {
98 Vector alpha_v1(tau_.size());
99 for(
int i=0;
i<tau_.size();
i++){
106 if(H1) *H1 = -1 *
alpha.asDiagonal();
107 if(H2) *H2 = Matrix::Identity(v2.size(),v2.size());
116 template<
class ARCHIVE>
118 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
119 ar & BOOST_SERIALIZATION_NVP(dt_);
120 ar & BOOST_SERIALIZATION_NVP(tau_);
137 public Testable<GaussMarkov1stOrderFactor<VALUE> > {
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
Concept check for values that can be used in unit tests.
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
noiseModel::Diagonal::shared_ptr model
friend class boost::serialization::access
A factor with a quadratic error function - a Gaussian.
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
NoiseModelFactor2< VALUE, VALUE > Base
SharedGaussian calcDiscreteNoiseModel(const SharedGaussian &model, double delta_t)
static const KeyFormatter DefaultKeyFormatter
void print(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Vector evaluateError(const VALUE &p1, const VALUE &p2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const override
GaussMarkov1stOrderFactor< VALUE > This
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Base class and basic functions for Lie types.
void serialize(ARCHIVE &ar, const unsigned int)
SharedNoiseModel noiseModel_
Non-linear factor base classes.
~GaussMarkov1stOrderFactor() override
GaussMarkov1stOrderFactor(const Key &key1, const Key &key2, double delta_t, Vector tau, const SharedGaussian &model)
boost::shared_ptr< GaussMarkov1stOrderFactor > shared_ptr
boost::shared_ptr< Gaussian > shared_ptr
static shared_ptr SqrtInformation(const Matrix &R, bool smart=true)
GaussMarkov1stOrderFactor()
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Gaussian::shared_ptr SharedGaussian