allow update

release/4.3a0
Frank Dellaert 2022-12-29 16:41:08 -05:00
parent a4659f01c7
commit 391d6fb70a
2 changed files with 7 additions and 0 deletions

View File

@ -118,6 +118,12 @@ class GTSAM_EXPORT HybridValues {
*/ */
Vector& at(Key j) { return continuous_.at(j); }; Vector& at(Key j) { return continuous_.at(j); };
/** For all key/value pairs in \c values, replace values with corresponding keys in this class
* with those in \c values. Throws std::out_of_range if any keys in \c values are not present
* in this class. */
void update(const VectorValues& values) { continuous_.update(values); }
/// @}
/// @name Wrapper support /// @name Wrapper support
/// @{ /// @{

View File

@ -16,6 +16,7 @@ class HybridValues {
bool equals(const gtsam::HybridValues& other, double tol) const; bool equals(const gtsam::HybridValues& other, double tol) const;
void insert(gtsam::Key j, int value); void insert(gtsam::Key j, int value);
void insert(gtsam::Key j, const gtsam::Vector& value); void insert(gtsam::Key j, const gtsam::Vector& value);
void update(const gtsam::VectorValues& values);
size_t& atDiscrete(gtsam::Key j); size_t& atDiscrete(gtsam::Key j);
gtsam::Vector& at(gtsam::Key j); gtsam::Vector& at(gtsam::Key j);
}; };