26 std::copy(continuousKeys.begin(), continuousKeys.end(),
27 std::back_inserter(allKeys));
29 std::back_inserter(allKeys),
37 std::copy(keys1.begin(), keys1.end(), std::back_inserter(allKeys));
38 std::copy(keys2.begin(), keys2.end(), std::back_inserter(allKeys));
46 std::copy(key1.begin(), key1.end(), std::back_inserter(allKeys));
47 std::copy(key2.begin(), key2.end(), std::back_inserter(allKeys));
53 :
Base(keys), isContinuous_(true), continuousKeys_(keys) {}
74 const This *
e =
dynamic_cast<const This *
>(&lf);
84 std::cout << (s.empty() ?
"" : s +
"\n");
const DiscreteKeys & discreteKeys() const
Return the discrete keys for this factor.
const KeyVector & continuousKeys() const
Return only the continuous keys for this factor.
const KeyFormatter & formatter
void print(const std::string &s="HybridFactor\, const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
const Symbol key1('v', 1)
virtual bool equals(const HybridFactor &lf, double tol=1e-9) const
equals
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
KeyVector continuousKeys_
Record continuous keys for book-keeping.
std::pair< Key, size_t > DiscreteKey
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
DiscreteKeys discreteKeys_
DiscreteKeys CollectDiscreteKeys(const DiscreteKeys &key1, const DiscreteKeys &key2)
KeyVector CollectKeys(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
const Symbol key2('v', 2)
bool equals(const This &other, double tol=1e-9) const
check equality
DiscreteKeys is a set of keys that can be assembled using the & operator.