42 using shared_ptr =
typename boost::shared_ptr<BinaryMeasurement>;
51 :
Factor(std::vector<Key>({key1, key2})),
61 Key key1()
const {
return keys_[0]; }
62 Key key2()
const {
return keys_[1]; }
63 const T &measured()
const {
return measured_; }
71 DefaultKeyFormatter)
const override {
72 std::cout << s <<
"BinaryMeasurement(" << keyFormatter(this->key1()) <<
","
73 << keyFormatter(this->key2()) <<
")\n";
75 this->noiseModel_->print(
" noise model: ");
83 noiseModel_->equals(*expected.noiseModel());
Concept check for values that can be used in unit tests.
The base class for all factors.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
noiseModel::Base::shared_ptr SharedNoiseModel
Note, deliberately not in noiseModel namespace.
Definition: NoiseModel.h:736
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:69
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Definition: Testable.h:58
Template to create a binary predicate.
Definition: Testable.h:111
This is the base class for all factor types.
Definition: Factor.h:56
KeyVector keys_
The keys involved in this factor.
Definition: Factor.h:73
Factor()
Default constructor for I/O.
Definition: Factor.h:79
bool equals(const This &other, double tol=1e-9) const
check equality
Definition: Factor.cpp:42
Definition: BinaryMeasurement.h:36
void print(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
Definition: BinaryMeasurement.h:70
virtual ~BinaryMeasurement()
Destructor.
Definition: BinaryMeasurement.h:56