Go to the documentation of this file.
34 result.push_back(y2.first);
35 return {
result,
y1.second + y2.second};
59 *
this = *
this + factor;
66 *
this = *
this + factor;
74 auto printer = [&](
const Y&
y) {
76 return "Graph of size " + std::to_string(
y.first.size()) +
77 ", scalar sum: " + std::to_string(
y.second);
81 std::cout <<
s <<
" Keys:";
83 std::cout <<
"." << std::endl;
97 auto emptyGaussian = [](
const Y&
y) {
103 return {
Base(*
this, emptyGaussian)};
Linear Factor Graph where all factors are Gaussians.
istream & operator>>(istream &inputStream, Matrix &destinationMatrix)
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const
Print the HybridGaussianProductFactor.
static Y add(const Y &y1, const Y &y2)
Typedefs for easier changing of types.
std::pair< GaussianFactorGraph, double > GaussianFactorGraphValuePair
GaussianFactorGraphValuePair Y
bool equals(const DecisionTree &other, const CompareFunc &compare=&DefaultCompare) const
const KeyFormatter & formatter
Alias for DecisionTree of GaussianFactorGraphs and their scalar sums.
void print(const std::string &s, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter) const
GTSAM-style print.
negation< all_of< negation< Ts >... > > any_of
DecisionTree< Key, GaussianFactorGraphValuePair > Base
A set of GaussianFactors, indexed by a set of discrete keys.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
HybridGaussianProductFactor()=default
Default constructor.
Decision Tree for use in DiscreteFactors.
std::shared_ptr< This > shared_ptr
shared_ptr to this class
HybridGaussianProductFactor operator+(const GaussianFactor::shared_ptr &factor) const
Add GaussianFactor into HybridGaussianProductFactor.
HybridGaussianProductFactor removeEmpty() const
Remove empty GaussianFactorGraphs from the decision tree.
bool equals(const HybridGaussianProductFactor &other, double tol=1e-9) const
Check if this HybridGaussianProductFactor is equal to another.
HybridGaussianProductFactor operator+(const HybridGaussianProductFactor &a, const HybridGaussianProductFactor &b)
const gtsam::Symbol key('X', 0)
virtual HybridGaussianProductFactor asProductFactor() const
Helper function to return factors and functional to create a DecisionTree of Gaussian Factor Graphs.
HybridGaussianProductFactor & operator+=(const GaussianFactor::shared_ptr &factor)
Add-assign operator for GaussianFactor.
Implementation of a discrete-conditioned hybrid factor. Implements a joint discrete-continuous factor...
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:26