Add contains
parent
e6662b8206
commit
57bcb9f4e6
|
@ -101,6 +101,14 @@ class GTSAM_EXPORT DiscreteValues : public Assignment<Key> {
|
||||||
*/
|
*/
|
||||||
DiscreteValues& update(const DiscreteValues& values);
|
DiscreteValues& update(const DiscreteValues& values);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the DiscreteValues contains the given key.
|
||||||
|
*
|
||||||
|
* @param key The key to check for.
|
||||||
|
* @return True if the key is present, false otherwise.
|
||||||
|
*/
|
||||||
|
bool contains(Key key) const { return this->find(key) != this->end(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Filter values by keys.
|
* @brief Filter values by keys.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue