42 using shared_ptr =
typename std::shared_ptr<BinaryMeasurement>;
51 :
Factor(std::vector<Key>({key1, key2})),
58 Key key1()
const {
return keys_[0]; }
59 Key key2()
const {
return keys_[1]; }
60 const T &measured()
const {
return measured_; }
68 DefaultKeyFormatter)
const override {
69 std::cout << s <<
"BinaryMeasurement(" << keyFormatter(this->key1()) <<
"," 70 << keyFormatter(this->key2()) <<
")\n";
72 this->noiseModel_->print(
" noise model: ");
80 noiseModel_->equals(*expected.noiseModel());
Concept check for values that can be used in unit tests.
Definition: BinaryMeasurement.h:36
KeyVector keys_
The keys involved in this factor.
Definition: Factor.h:87
Definition: Testable.h:112
void print(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
Definition: BinaryMeasurement.h:67
Definition: Testable.h:59
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
Definition: chartTesting.h:28
Factor()
Definition: Factor.h:93
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:741
The base class for all factors.
bool equals(const This &other, double tol=1e-9) const
check equality