Go to the documentation of this file.
36 class DiscreteFactorGraph;
37 class DiscreteConditional;
38 class DiscreteBayesNet;
39 class DiscreteEliminationTree;
40 class DiscreteBayesTree;
41 class DiscreteJunctionTree;
52 std::pair<DiscreteConditional::shared_ptr, DiscreteFactor::shared_ptr>
54 const Ordering& frontalKeys);
65 std::pair<DiscreteConditional::shared_ptr, DiscreteFactor::shared_ptr>
67 const Ordering& frontalKeys);
80 static std::pair<std::shared_ptr<ConditionalType>,
81 std::shared_ptr<FactorType> >
89 std::optional<std::reference_wrapper<const VariableIndex>> variableIndex) {
117 template <
typename ITERATOR>
119 :
Base(firstFactor, lastFactor) {}
122 template <
class CONTAINER>
127 template <
class DERIVED_FACTOR>
138 template <
typename... Args>
140 emplace_shared<DecisionTreeFactor>(std::forward<Args>(
args)...);
160 const std::string&
s =
"DiscreteFactorGraph",
170 OptionalOrderingType orderingType = {})
const;
178 DiscreteBayesNet sumProduct(
const Ordering&
ordering)
const;
186 DiscreteLookupDAG maxProduct(
187 OptionalOrderingType orderingType = {})
const;
195 DiscreteLookupDAG maxProduct(
const Ordering&
ordering)
const;
204 OptionalOrderingType orderingType = {})
const;
std::pair< DiscreteConditional::shared_ptr, DiscreteFactor::shared_ptr > EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Main elimination function for DiscreteFactorGraph.
std::pair< DiscreteConditional::shared_ptr, DiscreteFactor::shared_ptr > EliminateForMPE(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Alternate elimination function for that creates non-normalized lookup tables.
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::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.
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 Sun Dec 22 2024 04:11:28