Alias for DecisionTree of GaussianFactorGraphs and their scalar sums.
|
|
| HybridGaussianProductFactor ()=default |
| | Default constructor.
|
| template<class FACTOR> |
| | HybridGaussianProductFactor (const std::shared_ptr< FACTOR > &factor) |
| | Construct from a single factor.
|
| | HybridGaussianProductFactor (Base &&tree) |
| | Construct from DecisionTree.
|
|
HybridGaussianProductFactor | operator+ (const GaussianFactor::shared_ptr &factor) const |
| | Add GaussianFactor into HybridGaussianProductFactor.
|
|
HybridGaussianProductFactor | operator+ (const HybridGaussianFactor &factor) const |
| | Add HybridGaussianFactor into HybridGaussianProductFactor.
|
|
HybridGaussianProductFactor & | operator+= (const GaussianFactor::shared_ptr &factor) |
| | Add-assign operator for GaussianFactor.
|
|
HybridGaussianProductFactor & | operator+= (const HybridGaussianFactor &factor) |
| | Add-assign operator for HybridGaussianFactor.
|
| void | print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| | Print the HybridGaussianProductFactor.
|
| bool | equals (const HybridGaussianProductFactor &other, double tol=1e-9) const |
| | Check if this HybridGaussianProductFactor is equal to another.
|
| HybridGaussianProductFactor | removeEmpty () const |
| | Remove empty GaussianFactorGraphs from the decision tree.
|
|
| DecisionTree () |
| | Default constructor (for serialization).
|
|
| DecisionTree (const GaussianFactorGraphValuePair &y) |
| | Create a constant.
|
| | DecisionTree (const Key &label, const GaussianFactorGraphValuePair &y1, const GaussianFactorGraphValuePair &y2) |
| | Create tree with 2 assignments y1, y2, splitting on variable label.
|
|
| DecisionTree (const LabelC &label, const GaussianFactorGraphValuePair &y1, const GaussianFactorGraphValuePair &y2) |
| | Allow Label+Cardinality for convenience.
|
|
| DecisionTree (const std::vector< LabelC > &labelCs, const std::vector< GaussianFactorGraphValuePair > &ys) |
| | Create from keys and a corresponding vector of values.
|
|
| DecisionTree (const std::vector< LabelC > &labelCs, const std::string &table) |
| | Create from keys and string table.
|
|
| DecisionTree (Iterator begin, Iterator end, const Key &label) |
| | Create DecisionTree from others.
|
|
| DecisionTree (const Key &label, const DecisionTree &f0, const DecisionTree &f1) |
| | Create DecisionTree from two others.
|
| | DecisionTree (const Unary &op, DecisionTree &&other) noexcept |
| | Move constructor for DecisionTree.
|
| | DecisionTree (const DecisionTree< Key, X > &other, Func Y_of_X) |
| | Convert from a different value type.
|
| | DecisionTree (const DecisionTree< M, X > &other, const std::map< M, Key > &map, Func Y_of_X) |
| | Convert from a different value type X to value type Y, also translate labels via map from type M to L.
|
| void | print (const std::string &s, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter) const |
| | GTSAM-style print.
|
|
bool | equals (const DecisionTree &other, const CompareFunc &compare=&DefaultCompare) const |
|
virtual | ~DecisionTree ()=default |
| | Make virtual.
|
|
bool | empty () const |
| | Check if tree is empty.
|
|
bool | operator== (const DecisionTree &q) const |
| | equality
|
|
const GaussianFactorGraphValuePair & | operator() (const Assignment< Key > &x) const |
| | evaluate
|
| void | visit (Func f) const |
| | Visit all leaves in depth-first fashion.
|
| void | visitLeaf (Func f) const |
| | Visit all leaves in depth-first fashion.
|
| void | visitWith (Func f) const |
| | Visit all leaves in depth-first fashion.
|
|
size_t | nrLeaves () const |
| | Return the number of leaves in the tree.
|
| X | fold (Func f, X x0) const |
| | Fold a binary function over the tree, returning accumulator.
|
| std::set< Key > | labels () const |
| | Retrieve all unique labels as a set.
|
|
DecisionTree | apply (const Unary &op) const |
| | apply Unary operation "op" to f
|
| DecisionTree | apply (const UnaryAssignment &op) const |
| | Apply Unary operation "op" to f while also providing the corresponding assignment.
|
|
DecisionTree | apply (const DecisionTree &g, const Binary &op) const |
| | apply binary operation "op" to f and g
|
|
DecisionTree | choose (const Key &label, size_t index) const |
| | create a new function where value(label)==index It's like "restrict" in Darwiche09book pg329, 330?
|
|
DecisionTree | restrict (const Assignment< Key > &assignment) const |
| | Choose multiple values.
|
|
DecisionTree | combine (const Key &label, size_t cardinality, const Binary &op) const |
| | combine subtrees on key with binary operation "op"
|
|
DecisionTree | combine (const LabelC &labelC, const Binary &op) const |
| | combine with LabelC for convenience
|
|
void | dot (std::ostream &os, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter, bool showZero=true) const |
| | output to graphviz format, stream version
|
|
void | dot (const std::string &name, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter, bool showZero=true) const |
| | output to graphviz format, open a file
|
|
std::string | dot (const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter, bool showZero=true) const |
| | output to graphviz format string
|
| std::pair< DecisionTree< Key, A >, DecisionTree< Key, B > > | split (std::function< std::pair< A, B >(const GaussianFactorGraphValuePair &)> AB_of_Y) const |
| | Convert into two trees with value types A and B.
|
|
| DecisionTree (const NodePtr &root) |
|
|
static NodePtr | compose (Iterator begin, Iterator end, const Key &label) |
|
NodePtr | root_ |
| | A DecisionTree just contains the root. TODO(dellaert): make protected.
|
|
static bool | DefaultCompare (const GaussianFactorGraphValuePair &a, const GaussianFactorGraphValuePair &b) |
| | Default method for comparison of two objects of type Y.
|
|
static NodePtr | build (It begin, It end, ValueIt beginY, ValueIt endY) |
| | Internal recursive function to create from keys, cardinalities, and Y values.
|
| static NodePtr | create (It begin, It end, ValueIt beginY, ValueIt endY) |
| | Internal helper function to create a tree from keys, cardinalities, and Y values.
|
| static NodePtr | convertFrom (const typename DecisionTree< Key, X >::NodePtr &f, std::function< GaussianFactorGraphValuePair(const X &)> Y_of_X) |
| | Convert from a DecisionTree<L, X> to DecisionTree<L, Y>.
|
| static NodePtr | convertFrom (const typename DecisionTree< M, X >::NodePtr &f, std::function< Key(const M &)> L_of_M, std::function< GaussianFactorGraphValuePair(const X &)> Y_of_X) |
| | Convert from a DecisionTree<M, X> to DecisionTree<L, Y>.
|