35 template<
class ValueType>
44 template<
class ValueType>
50 key(_key), value(_value) {
53 key(rhs.key), value(rhs.value) {
61 template<
class ValueType,
class CastedKeyValuePairType,
class KeyValuePairType>
63 static CastedKeyValuePairType
cast(KeyValuePairType key_value) {
65 return CastedKeyValuePairType(key_value.key,
67 ValueType>&>(key_value.value)).
value());
71 template<
class CastedKeyValuePairType,
class KeyValuePairType>
73 static CastedKeyValuePairType
cast(KeyValuePairType key_value) {
77 return CastedKeyValuePairType(key_value.key, key_value.value);
81 template<
class CastedKeyValuePairType,
class KeyValuePairType>
83 static CastedKeyValuePairType
cast(KeyValuePairType key_value) {
87 return CastedKeyValuePairType(key_value.key, key_value.value);
92 template<
class ValueType>
93 class Values::Filtered {
101 boost::transform_iterator<
102 KeyValuePair(*)(Values::KeyValuePair),
103 boost::filter_iterator<
104 boost::function<
bool(
const Values::ConstKeyValuePair&)>,
111 boost::transform_iterator<
112 ConstKeyValuePair(*)(Values::ConstKeyValuePair),
113 boost::filter_iterator<
114 boost::function<
bool(
const Values::ConstKeyValuePair&)>,
120 const_iterator
begin()
const {
return begin_; }
121 const_iterator
end()
const {
return end_; }
135 const boost::function<
bool(
const Values::ConstKeyValuePair&)>& filter,
138 boost::make_transform_iterator(
139 boost::make_filter_iterator(filter, values.begin(), values.
end()),
141 boost::make_transform_iterator(
142 boost::make_filter_iterator(filter, values.
end(), values.
end()),
144 boost::make_transform_iterator(
145 boost::make_filter_iterator(filter,
146 ((const
Values&) values).begin(),
149 Values::ConstKeyValuePair>::
cast)), constEnd_(
150 boost::make_transform_iterator(
151 boost::make_filter_iterator(filter,
166 template<
class ValueType>
167 class Values::ConstFiltered {
178 begin_(rhs.beginConst()),
179 end_(rhs.endConst()) {}
182 iterator
end() {
return end_; }
183 const_iterator
begin()
const {
return begin_; }
184 const_iterator
end()
const {
return end_; }
189 for (const_iterator it = begin(); it !=
end(); ++it)
196 for(const_iterator it = begin(); it !=
end(); ++it)
197 result.push_back(it->key);
206 const boost::function<
bool(
const Values::ConstKeyValuePair&)>& filter,
218 template<
class ValueType>
220 for(
const auto key_value: view) {
222 insert(key, static_cast<const ValueType&>(key_value.value));
227 template<
class ValueType>
229 for(
const auto key_value: view) {
231 insert(key, static_cast<const ValueType&>(key_value.value));
236 Values::Filtered<Value>
238 return filter<Value>(filterFcn);
242 template<
class ValueType>
243 Values::Filtered<ValueType>
249 Values::ConstFiltered<Value>
251 return filter<Value>(filterFcn);
255 template<
class ValueType>
256 Values::ConstFiltered<ValueType>
263 inline bool Values::filterHelper<Value>(
const boost::function<bool(Key)> filter,
264 const ConstKeyValuePair& key_value) {
266 return filter(key_value.key);
275 template <
typename ValueType>
281 }
catch (std::bad_cast&) {
287 template <
typename MatrixType,
bool isDynamic>
291 template <
int M,
int N>
297 }
catch (std::bad_cast&) {
305 template <
int M,
int N>
311 }
catch (std::bad_cast&) {
321 if (A.rows() !=
M || A.cols() !=
N)
330 template <
int M,
int N>
341 template <
typename ValueType>
344 KeyValueMap::const_iterator item = values_.find(j);
352 return h(j, item->second);
356 template<
typename ValueType>
359 KeyValueMap::const_iterator item = values_.find(j);
361 if(item != values_.end()) {
366 }
catch (std::bad_cast &) {
368 const Value* value = item->second;
379 template<
typename ValueType>
385 template <
typename ValueType>
Eigen::Matrix< double, M, N > operator()(Key j, const Value *const pointer)
const_const_iterator beginConst() const
Matrix< RealScalar, Dynamic, Dynamic > M
_ValuesConstKeyValuePair(const _ValuesKeyValuePair< ValueType > &rhs)
A non-templated config holding any types of Manifold-group elements.
void insert(Key j, const Value &val)
const_iterator end() const
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set view
Namespace containing all symbols from the Eigen library.
_ValuesKeyValuePair< ValueType > KeyValuePair
Eigen::Matrix< double, M, N > operator()(Key j, const Value *const pointer)
const T & value() const
Return a constant value.
const_const_iterator constBegin_
const_const_iterator constEnd_
ValueType operator()(Key j, const Value *const pointer)
static CastedKeyValuePairType cast(KeyValuePairType key_value)
boost::transform_iterator< boost::function1< KeyValuePair, const KeyValuePtrPair & >, KeyValueMap::iterator > iterator
Mutable forward iterator, with value type KeyValuePair.
ConstFiltered(const Filtered< ValueType > &rhs)
Filtered< ValueType >::const_const_iterator iterator
const ValueType at(Key j) const
Eigen::Matrix< double, M, N > operator()(Key j, const Value *const pointer)
EIGEN_DEVICE_FUNC NewType cast(const OldType &x)
Filtered< ValueType >::const_const_iterator const_iterator
boost::transform_iterator< boost::function1< ConstKeyValuePair, const ConstKeyValuePtrPair & >, KeyValueMap::const_iterator > const_iterator
Const forward iterator, with value type ConstKeyValuePair.
static CastedKeyValuePairType cast(KeyValuePairType key_value)
const_iterator begin() const
const_const_iterator endConst() const
_ValuesConstKeyValuePair< ValueType > KeyValuePair
boost::transform_iterator< KeyValuePair(*)(Values::KeyValuePair), boost::filter_iterator< boost::function< bool(const Values::ConstKeyValuePair &)>, Values::iterator > > iterator
ValueType & value
The value.
_ValuesConstKeyValuePair< ValueType > ConstKeyValuePair
static CastedKeyValuePairType cast(KeyValuePairType key_value)
Filtered(const boost::function< bool(const Values::ConstKeyValuePair &)> &filter, Values &values)
void update(Key j, const Value &val)
const ValueType & value
The value.
boost::transform_iterator< ConstKeyValuePair(*)(Values::ConstKeyValuePair), boost::filter_iterator< boost::function< bool(const Values::ConstKeyValuePair &)>, Values::const_iterator > > const_const_iterator
The matrix class, also used for vectors and row-vectors.
const_iterator end() const
_ValuesConstKeyValuePair(Key _key, const ValueType &_value)
ConstFiltered(const boost::function< bool(const Values::ConstKeyValuePair &)> &filter, const Values &values)
_ValuesKeyValuePair(Key _key, ValueType &_value)
const_iterator begin() const
std::uint64_t Key
Integer nonlinear key type.
Filtered< Value > filter(const boost::function< bool(Key)> &filterFcn)
FastList< Key > keys() const