#include <HybridValues.h>
Public Member Functions | |
Standard Constructors | |
| HybridValues ()=default | |
| Default constructor creates an empty HybridValues. More... | |
| HybridValues (const VectorValues &cv, const DiscreteValues &dv) | |
| Construct from DiscreteValues and VectorValues. More... | |
| HybridValues (const VectorValues &cv, const DiscreteValues &dv, const Values &v) | |
| Construct from all values types. More... | |
Testable | |
| void | print (const std::string &s="HybridValues", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
| print required by Testable for unit testing More... | |
| bool | equals (const HybridValues &other, double tol=1e-9) const |
| equals required by Testable for unit testing More... | |
Interface | |
| const VectorValues & | continuous () const |
| Return the multi-dimensional vector values. More... | |
| const DiscreteValues & | discrete () const |
| Return the discrete values. More... | |
| const Values & | nonlinear () const |
| Return the nonlinear values. More... | |
| bool | existsVector (Key j) |
Check whether a variable with key j exists in VectorValues. More... | |
| bool | existsDiscrete (Key j) |
Check whether a variable with key j exists in DiscreteValues. More... | |
| bool | existsNonlinear (Key j) |
Check whether a variable with key j exists in values. More... | |
| bool | exists (Key j) |
Check whether a variable with key j exists. More... | |
| void | insert (Key j, const Vector &value) |
| void | insert (Key j, size_t value) |
| void | insert_or_assign (Key j, const Vector &value) |
| insert_or_assign() , similar to Values.h More... | |
| void | insert_or_assign (Key j, size_t value) |
| insert_or_assign() , similar to Values.h More... | |
| HybridValues & | insert (const VectorValues &values) |
| HybridValues & | insert (const DiscreteValues &values) |
| HybridValues & | insert (const Values &values) |
| HybridValues & | insert (const HybridValues &values) |
| Vector & | at (Key j) |
| size_t & | atDiscrete (Key j) |
| HybridValues & | update (const VectorValues &values) |
| HybridValues & | update (const DiscreteValues &values) |
| HybridValues & | update (const HybridValues &values) |
| VectorValues | continuousSubset (const KeyVector &keys) const |
| Extract continuous values with given keys. More... | |
Wrapper support | |
| std::string | html (const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
| Output as a html table. More... | |
Private Attributes | |
| VectorValues | continuous_ |
| DiscreteValues | discrete_ |
| Values | nonlinear_ |
HybridValues represents a collection of DiscreteValues and VectorValues. It is typically used to store the variables of a HybridGaussianFactorGraph. Optimizing a HybridGaussianBayesNet returns this class.
Definition at line 38 of file HybridValues.h.
|
default |
Default constructor creates an empty HybridValues.
|
inline |
Construct from DiscreteValues and VectorValues.
Definition at line 57 of file HybridValues.h.
|
inline |
Construct from all values types.
Definition at line 61 of file HybridValues.h.
Read/write access to the vector value with key j, throws std::out_of_range if j does not exist.
Definition at line 169 of file HybridValues.h.
Read/write access to the discrete value with key j, throws std::out_of_range if j does not exist.
Definition at line 175 of file HybridValues.h.
|
inline |
Return the multi-dimensional vector values.
Definition at line 89 of file HybridValues.h.
|
inline |
Extract continuous values with given keys.
Definition at line 206 of file HybridValues.h.
|
inline |
Return the discrete values.
Definition at line 92 of file HybridValues.h.
|
inline |
equals required by Testable for unit testing
Definition at line 79 of file HybridValues.h.
|
inline |
Check whether a variable with key j exists.
Definition at line 109 of file HybridValues.h.
|
inline |
Check whether a variable with key j exists in DiscreteValues.
Definition at line 101 of file HybridValues.h.
|
inline |
Check whether a variable with key j exists in values.
Definition at line 104 of file HybridValues.h.
|
inline |
Check whether a variable with key j exists in VectorValues.
Definition at line 98 of file HybridValues.h.
|
inline |
Output as a html table.
| keyFormatter | function that formats keys. |
Definition at line 224 of file HybridValues.h.
Insert a vector value with key j. Throws an invalid_argument exception if the key j is already used.
| value | The vector to be inserted. |
| j | The index with which the value will be associated. |
Definition at line 117 of file HybridValues.h.
Insert a discrete value with key j. Replaces the existing value if the key j is already used.
| value | The vector to be inserted. |
| j | The index with which the value will be associated. |
Definition at line 123 of file HybridValues.h.
|
inline |
Insert all continuous values from values. Throws an invalid_argument exception if any keys to be inserted are already used.
Definition at line 137 of file HybridValues.h.
|
inline |
Insert all discrete values from values. Throws an invalid_argument exception if any keys to be inserted are already used.
Definition at line 144 of file HybridValues.h.
|
inline |
Insert all values from values. Throws an invalid_argument exception if any keys to be inserted are already used.
Definition at line 151 of file HybridValues.h.
|
inline |
Insert all values from values. Throws an invalid_argument exception if any keys to be inserted are already used.
Definition at line 158 of file HybridValues.h.
insert_or_assign() , similar to Values.h
Definition at line 126 of file HybridValues.h.
insert_or_assign() , similar to Values.h
Definition at line 131 of file HybridValues.h.
|
inline |
Return the nonlinear values.
Definition at line 95 of file HybridValues.h.
|
inline |
print required by Testable for unit testing
Definition at line 70 of file HybridValues.h.
|
inline |
For all key/value pairs in values, replace continuous values with corresponding keys in this object with those in values. Throws std::out_of_range if any keys in values are not present in this object.
Definition at line 181 of file HybridValues.h.
|
inline |
For all key/value pairs in values, replace discrete values with corresponding keys in this object with those in values. Throws std::out_of_range if any keys in values are not present in this object.
Definition at line 190 of file HybridValues.h.
|
inline |
For all key/value pairs in values, replace all values with corresponding keys in this object with those in values. Throws std::out_of_range if any keys in values are not present in this object.
Definition at line 199 of file HybridValues.h.
|
private |
Definition at line 41 of file HybridValues.h.
|
private |
Definition at line 44 of file HybridValues.h.
|
private |
Definition at line 47 of file HybridValues.h.