Go to the documentation of this file.
35 class DiscreteFactorGraph;
36 class DiscreteConditional;
37 class DiscreteBayesNet;
38 class DiscreteEliminationTree;
39 class DiscreteBayesTree;
40 class DiscreteJunctionTree;
51 std::pair<DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr>
53 const Ordering& frontalKeys);
64 std::pair<DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr>
66 const Ordering& frontalKeys);
79 static std::pair<std::shared_ptr<ConditionalType>,
80 std::shared_ptr<FactorType> >
88 std::optional<std::reference_wrapper<const VariableIndex>> variableIndex) {
116 template <
typename ITERATOR>
118 :
Base(firstFactor, lastFactor) {}
121 template <
class CONTAINER>
126 template <
class DERIVED_FACTOR>
137 template <
typename... Args>
139 emplace_shared<DecisionTreeFactor>(std::forward<Args>(
args)...);
159 const std::string&
s =
"DiscreteFactorGraph",
169 OptionalOrderingType orderingType = {})
const;
177 DiscreteBayesNet sumProduct(
const Ordering&
ordering)
const;
185 DiscreteLookupDAG maxProduct(
186 OptionalOrderingType orderingType = {})
const;
194 DiscreteLookupDAG maxProduct(
const Ordering&
ordering)
const;
203 OptionalOrderingType orderingType = {})
const;
string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of markdown.
DiscreteFactorGraph()
map from keys to values
Array< double, 1, 3 > e(1./3., 0.5, 2.)
DiscreteEliminationTree EliminationTreeType
Type of elimination tree.
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
const GaussianFactorGraph factors
DiscreteJunctionTree JunctionTreeType
Type of Junction tree.
const KeyFormatter & formatter
DiscreteFactor FactorType
Type of factors in factor graph.
Variable ordering for the elimination algorithm.
DiscreteKeys is a set of keys that can be assembled using the & operator.
DiscreteFactorGraph FactorGraphType
Type of the factor graph (e.g. DiscreteFactorGraph)
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
DiscreteFactorGraph(const CONTAINER &factors)
void print(const Matrix &A, const string &s, ostream &stream)
A thin wrapper around std::set that uses boost's fast_pool_allocator.
static Ordering DefaultOrderingFunc(const FactorGraphType &graph, std::optional< std::reference_wrapper< const VariableIndex >> variableIndex)
The default ordering generation function.
Elimination tree for discrete factors.
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
static Ordering Colamd(const FACTOR_GRAPH &graph)
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Main elimination function for DiscreteFactorGraph.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
DiscreteFactorGraph(ITERATOR firstFactor, ITERATOR lastFactor)
static std::pair< std::shared_ptr< ConditionalType >, std::shared_ptr< FactorType > > DefaultEliminate(const FactorGraphType &factors, const Ordering &keys)
The default dense elimination function.
DiscreteBayesTree BayesTreeType
Type of Bayes tree.
Variable elimination algorithms for factor graphs.
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateForMPE(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Alternate elimination function for that creates non-normalized lookup tables.
static enum @1096 ordering
DiscreteConditional ConditionalType
Type of conditionals from elimination.
DiscreteValues::Names Names
Translation table from values to strings.
void add(Args &&... args)
A Bayes tree representing a Discrete distribution.
void product(const MatrixType &m)
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
DiscreteBayesNet BayesNetType
Type of Bayes net from sequential elimination.
NonlinearFactorGraph graph
DiscreteFactorGraph(const FactorGraph< DERIVED_FACTOR > &graph)
std::shared_ptr< This > shared_ptr
shared_ptr to This
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:13