51 using shared_ptr = boost::shared_ptr<This>;
53 using sharedFactor = boost::shared_ptr<GaussianFactor>;
100 const std::vector<sharedFactor> &factors)
102 Factors(discreteKeys, factors)) {}
111 const std::string &s =
"GaussianMixtureFactor\n",
112 const KeyFormatter &formatter = DefaultKeyFormatter)
const override;
144 double error(
const HybridValues &values)
const override;
149 sum = factor.
add(sum);
156 friend class boost::serialization::access;
157 template <
class ARCHIVE>
158 void serialize(ARCHIVE &ar,
const unsigned int ) {
159 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
160 ar &BOOST_SERIALIZATION_NVP(factors_);
Decision Tree for use in DiscreteFactors.
Algebraic Decision Trees.
specialized key for discrete variables
Linear Factor Graph where all factors are Gaussians.
A factor with a quadratic error function - a Gaussian.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
Template to create a binary predicate.
Definition Testable.h:111
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
Algebraic Decision Trees fix the range to double Just has some nice constructors and some syntactic s...
Definition AlgebraicDecisionTree.h:38
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
A map from keys to values.
Definition DiscreteValues.h:34
Implementation of a discrete conditional mixture factor.
Definition GaussianMixtureFactor.h:47
GaussianMixtureFactor()=default
Default constructor, mainly for serialization.
GaussianMixtureFactor(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, const std::vector< sharedFactor > &factors)
Construct a new GaussianMixtureFactor object using a vector of GaussianFactor shared pointers.
Definition GaussianMixtureFactor.h:98
GaussianFactorGraphTree add(const GaussianFactorGraphTree &sum) const
Combine the Gaussian Factor Graphs in sum and this while maintaining the original tree structure.
Definition GaussianMixtureFactor.cpp:85
friend GaussianFactorGraphTree & operator+=(GaussianFactorGraphTree &sum, const GaussianMixtureFactor &factor)
Add MixtureFactor to a Sum, syntactic sugar.
Definition GaussianMixtureFactor.h:147
Base class for truly hybrid probabilistic factors.
Definition HybridFactor.h:52
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
The Factor::error simply extracts the.
The Factor::error simply extracts the.