118 std::vector<GaussianConditional::shared_ptr> &&
conditionals);
131 const std::vector<GaussianConditional::shared_ptr> &
conditionals);
142 const std::string &
s =
"GaussianMixture\n",
154 size_t nrComponents()
const;
167 std::shared_ptr<GaussianMixtureFactor> likelihood(
225 double logProbability(
const HybridValues &values)
const override;
228 double evaluate(
const HybridValues &values)
const override;
232 return evaluate(values);
258 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 260 friend class boost::serialization::access;
261 template <
class Archive>
262 void serialize(Archive &ar,
const unsigned int ) {
263 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(
BaseFactor);
265 ar &BOOST_SERIALIZATION_NVP(conditionals_);
void print(const Matrix &A, const string &s, ostream &stream)
A set of GaussianFactors, indexed by a set of discrete keys.
Decision Tree for use in DiscreteFactors.
std::shared_ptr< This > shared_ptr
shared_ptr to this class
Base class for conditional densities.
std::string serialize(const T &input)
serializes to a string
static const KeyFormatter DefaultKeyFormatter
double operator()(const HybridValues &values) const
Evaluate probability density, sugar.
const KeyFormatter & formatter
double logConstant_
log of the normalization constant.
A conditional of gaussian mixtures indexed by discrete variables, as part of a Bayes Network...
std::set< DiscreteKey > DiscreteKeysAsSet(const DiscreteKeys &discreteKeys)
Return the DiscreteKey vector as a set.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Conditional Gaussian Base class.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
double logNormalizationConstant() const override
specialized key for discrete variables
Conditionals conditionals_
a decision tree of Gaussian conditionals.
std::shared_ptr< GaussianMixture > shared_ptr
std::function< double(const Assignment< Key > &, double)> prunerFunc(const DecisionTreeFactor &prunedDecisionTree, const HybridConditional &conditional)
Helper function to get the pruner functional.
graph add(PriorFactor< Pose2 >(1, priorMean, priorNoise))
const std::vector< GaussianConditional::shared_ptr > conditionals
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
DiscreteKeys is a set of keys that can be assembled using the & operator.