less verbose name path for SymbolGenerator
parent
e3a28767ed
commit
672635aad4
|
|
@ -162,6 +162,7 @@ inline Key W(std::uint64_t j) { return Symbol('w', j); }
|
|||
inline Key X(std::uint64_t j) { return Symbol('x', j); }
|
||||
inline Key Y(std::uint64_t j) { return Symbol('y', j); }
|
||||
inline Key Z(std::uint64_t j) { return Symbol('z', j); }
|
||||
}
|
||||
|
||||
/** Generates symbol shorthands with alternative names different than the
|
||||
* one-letter predefined ones. */
|
||||
|
|
@ -171,7 +172,6 @@ public:
|
|||
SymbolGenerator(const char c) : c_(c) {}
|
||||
Symbol operator()(const std::uint64_t j) const { return Symbol(c_, j); }
|
||||
};
|
||||
}
|
||||
|
||||
/// traits
|
||||
template<> struct traits<Symbol> : public Testable<Symbol> {};
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ TEST(Key, SymbolGenerator) {
|
|||
const auto v1 = gtsam::symbol_shorthand::V(1);
|
||||
const auto a1 = gtsam::symbol_shorthand::A(1);
|
||||
|
||||
const auto Z = gtsam::symbol_shorthand::SymbolGenerator('x');
|
||||
const auto DZ = gtsam::symbol_shorthand::SymbolGenerator('v');
|
||||
const auto DDZ = gtsam::symbol_shorthand::SymbolGenerator('a');
|
||||
const auto Z = gtsam::SymbolGenerator('x');
|
||||
const auto DZ = gtsam::SymbolGenerator('v');
|
||||
const auto DDZ = gtsam::SymbolGenerator('a');
|
||||
|
||||
const auto z1 = Z(1);
|
||||
const auto dz1 = DZ(1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue