New method merge (mainly for MATLAB)
parent
9373711a85
commit
3f125b46df
1
gtsam.h
1
gtsam.h
|
@ -1725,6 +1725,7 @@ class KeySet {
|
|||
|
||||
// structure specific methods
|
||||
void insert(size_t key);
|
||||
void merge(gtsam::KeySet& other);
|
||||
bool erase(size_t key); // returns true if value was removed
|
||||
bool count(size_t key) const; // returns true if value exists
|
||||
|
||||
|
|
|
@ -103,6 +103,11 @@ public:
|
|||
/** Check for equality within tolerance to implement Testable */
|
||||
bool equals(const FastSet<VALUE>& other, double tol = 1e-9) const { return FastSetTestableHelper<VALUE>::equals(*this, other, tol); }
|
||||
|
||||
/** insert another set: handy for MATLAB access */
|
||||
void merge(const FastSet& other) {
|
||||
Base::insert(other.begin(),other.end());
|
||||
}
|
||||
|
||||
private:
|
||||
/** Serialization function */
|
||||
friend class boost::serialization::access;
|
||||
|
|
Loading…
Reference in New Issue