Go to the documentation of this file.
58 : continuous_(cv), discrete_(dv){}
63 : continuous_(cv), discrete_(dv), nonlinear_(
v){}
70 void print(
const std::string&
s =
"HybridValues",
72 std::cout <<
s <<
": \n";
73 continuous_.
print(
" Continuous",
75 discrete_.
print(
" Discrete", keyFormatter);
110 return existsVector(
j) || existsDiscrete(
j) || existsNonlinear(
j);
226 std::stringstream
ss;
227 ss << this->continuous_.
html(keyFormatter);
228 ss << this->discrete_.
html(keyFormatter);
void print(const std::string &str="VectorValues", const KeyFormatter &formatter=DefaultKeyFormatter) const
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print required by Testable.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
HybridValues & insert(const DiscreteValues &values)
HybridValues & insert(const VectorValues &values)
iterator insert(const std::pair< Key, Vector > &key_value)
const VectorValues & continuous() const
Return the multi-dimensional vector values.
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Output as a html table.
size_t & atDiscrete(Key j)
HybridValues & update(const VectorValues &values)
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const
Output as a html table.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
HybridValues(const VectorValues &cv, const DiscreteValues &dv, const Values &v)
Construct from all values types.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
static std::stringstream ss
bool exists(Key j)
Check whether a variable with key j exists.
bool existsDiscrete(Key j)
Check whether a variable with key j exists in DiscreteValues.
bool existsVector(Key j)
Check whether a variable with key j exists in VectorValues.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
VectorValues & update(const VectorValues &values)
DiscreteValues & update(const DiscreteValues &values)
VectorValues continuousSubset(const KeyVector &keys) const
Extract continuous values with given keys.
An assignment from labels to a discrete value index (size_t)
specialized key for discrete variables
const gtsam::Symbol key('X', 0)
const DiscreteValues & discrete() const
Return the discrete values.
void insert(Key j, const Vector &value)
bool equals(const DiscreteValues &x, double tol=1e-9) const
equals required by Testable for unit testing.
bool equals(const VectorValues &x, double tol=1e-9) const
void insert_or_assign(Key j, const Vector &value)
void insert_or_assign(Key j, const Vector &value)
insert_or_assign() , similar to Values.h
std::pair< iterator, bool > insert(const value_type &value)
void insert(Key j, const Value &val)
Array< int, Dynamic, 1 > v
HybridValues(const VectorValues &cv, const DiscreteValues &dv)
Construct from DiscreteValues and VectorValues.
bool existsNonlinear(Key j)
Check whether a variable with key j exists in values.
HybridValues & insert(const HybridValues &values)
HybridValues & insert(const Values &values)
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Output as a html table.
std::uint64_t Key
Integer nonlinear key type.
void insert(Key j, size_t value)
HybridValues & update(const DiscreteValues &values)
bool equals(const HybridValues &other, double tol=1e-9) const
equals required by Testable for unit testing
A non-templated config holding any types of Manifold-group elements.
void print(const std::string &s="HybridValues", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print required by Testable for unit testing
HybridValues & update(const HybridValues &values)
void insert_or_assign(Key j, size_t value)
insert_or_assign() , similar to Values.h
const Values & nonlinear() const
Return the nonlinear values.
gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:02:34