36 template<
class ValueType>
45 template<
class ValueType>
51 key(_key), value(_value) {
54 key(rhs.key), value(rhs.value) {
62 template<
class ValueType,
class CastedKeyValuePairType,
class KeyValuePairType>
64 static CastedKeyValuePairType
cast(KeyValuePairType key_value) {
66 return CastedKeyValuePairType(key_value.key,
68 ValueType>&>(key_value.value)).
value());
72 template<
class CastedKeyValuePairType,
class KeyValuePairType>
74 static CastedKeyValuePairType
cast(KeyValuePairType key_value) {
78 return CastedKeyValuePairType(key_value.key, key_value.value);
82 template<
class CastedKeyValuePairType,
class KeyValuePairType>
84 static CastedKeyValuePairType
cast(KeyValuePairType key_value) {
88 return CastedKeyValuePairType(key_value.key, key_value.value);
93 template <
class ValueType>
96 for (
const auto& [
_,
value] : values_) {
103 template <
class ValueType>
104 std::map<Key, ValueType>
106 std::map<Key, ValueType>
result;
107 for (
const auto& [
key,
value] : values_) {
109 if (filterFcn(
key)) {
113 result[
key] =
t->value();
121 inline bool Values::filterHelper<Value>(
const std::function<bool(Key)> filter,
124 return filter(key_value.key);
133 template <
typename ValueType>
146 template <
typename MatrixType,
bool isDynamic>
150 template <
int M,
int N>
165 template <
int M,
int N>
183 if (A.rows() !=
M || A.cols() !=
N)
192 template <
int M,
int N>
203 template <
typename ValueType>
206 KeyValueMap::const_iterator item = values_.find(j);
214 return h(j, item->second.get());
218 template<
typename ValueType>
221 KeyValueMap::const_iterator item = values_.find(j);
223 if(item != values_.end()) {
228 return &ptr->
value();
241 template<
typename ValueType>
247 template <
typename ValueType>
253 template <
typename ValueType>
Eigen::Matrix< double, M, N > operator()(Key j, const Value *const pointer)
Matrix< RealScalar, Dynamic, Dynamic > M
_ValuesConstKeyValuePair(const _ValuesKeyValuePair< ValueType > &rhs)
A non-templated config holding any types of Manifold-group elements.
const ValueType at(Key j) const
std::map< Key, ValueType > extract(const std::function< bool(Key)> &filterFcn=&_truePredicate< Key >) const
void update(Key j, const Value &val)
Namespace containing all symbols from the Eigen library.
Eigen::Matrix< double, M, N > operator()(Key j, const Value *const pointer)
A key-value pair, which you get by dereferencing iterators.
ValueType operator()(Key j, const Value *const pointer)
static CastedKeyValuePairType cast(KeyValuePairType key_value)
Eigen::Matrix< double, M, N > operator()(Key j, const Value *const pointer)
static CastedKeyValuePairType cast(KeyValuePairType key_value)
void insert_or_assign(Key j, const Value &val)
If key j exists, update value, else perform an insert.
constexpr descr< N - 1 > _(char const (&text)[N])
ValueType & value
The value.
static CastedKeyValuePairType cast(KeyValuePairType key_value)
void insert(Key j, const Value &val)
const ValueType & value
The value.
The matrix class, also used for vectors and row-vectors.
_ValuesConstKeyValuePair(Key _key, const ValueType &_value)
_ValuesKeyValuePair(Key _key, ValueType &_value)
std::uint64_t Key
Integer nonlinear key type.
const T & value() const
Return a constant value.