100 const std::vector<sharedFactor> &
factors)
102 Factors(discreteKeys, factors)) {}
111 const std::string &
s =
"GaussianMixtureFactor\n",
152 sum = factor.
add(sum);
158 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 160 friend class boost::serialization::access;
161 template <
class ARCHIVE>
162 void serialize(ARCHIVE &ar,
const unsigned int ) {
163 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
164 ar &BOOST_SERIALIZATION_NVP(factors_);
void print(const Matrix &A, const string &s, ostream &stream)
Decision Tree for use in DiscreteFactors.
std::string serialize(const T &input)
serializes to a string
Implementation of a discrete conditional mixture factor. Implements a joint discrete-continuous facto...
A factor with a quadratic error function - a Gaussian.
const GaussianFactorGraph factors
static const KeyFormatter DefaultKeyFormatter
Algebraic Decision Trees.
const KeyFormatter & formatter
const Factors & factors() const
Getter for GaussianFactor decision tree.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::shared_ptr< GaussianFactor > sharedFactor
Linear Factor Graph where all factors are Gaussians.
std::shared_ptr< This > shared_ptr
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
specialized key for discrete variables
GaussianMixtureFactor(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, const std::vector< sharedFactor > &factors)
Construct a new GaussianMixtureFactor object using a vector of GaussianFactor shared pointers...
graph add(PriorFactor< Pose2 >(1, priorMean, priorNoise))
friend GaussianFactorGraphTree & operator+=(GaussianFactorGraphTree &sum, const GaussianMixtureFactor &factor)
Add MixtureFactor to a Sum, syntactic sugar.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
GaussianFactorGraphTree add(const GaussianFactorGraphTree &sum) const
Combine the Gaussian Factor Graphs in sum and this while maintaining the original tree structure...
Factors factors_
Decision tree of Gaussian factors indexed by discrete keys.
DiscreteKeys is a set of keys that can be assembled using the & operator.