25 template<
class BAYESTREE,
class GRAPH>
49 int problemSize()
const {
return problemSize_; }
52 void print(
const std::string& s =
"",
const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
80 void print(
const std::string& s =
"",
const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
92 std::pair<boost::shared_ptr<BayesTreeType>, boost::shared_ptr<FactorGraphType> >
const FastVector< sharedNode > & roots() const
Return the set of roots (one for a tree, multiple for a forest)
Definition: ClusterTree.h:101
ClusterTree< BAYESTREE, GRAPH > This
This class.
Definition: ClusterTree.h:31
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor...
Definition: DiscreteFactor.h:33
Cluster Node
Define Node=Cluster for compatibility with tree traversal functions.
Definition: ClusterTree.h:56
boost::shared_ptr< Cluster > sharedCluster
Shared pointer to Cluster.
Definition: ClusterTree.h:55
GRAPH::FactorType FactorType
The type of factors.
Definition: ClusterTree.h:30
Definition: ClusterTree.h:39
boost::shared_ptr< This > shared_ptr
Shared pointer to this class.
Definition: ClusterTree.h:32
ClusterTree(const This &other)
Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are copied...
Definition: ClusterTree.h:71
std::pair< boost::shared_ptr< BayesTreeType >, boost::shared_ptr< FactorGraphType > > eliminate(const Eliminate &function) const
Eliminate the factors to a Bayes tree and remaining factor graph.
Definition: ClusterTree-inst.h:156
boost::shared_ptr< FactorType > sharedFactor
Shared pointer to a factor.
Definition: ClusterTree.h:33
FactorGraphType::Eliminate Eliminate
Typedef for an eliminate subroutine.
Definition: ClusterTree.h:37
GTSAM_CONCEPT_TESTABLE_TYPE(FactorType)
concept check
Concept check for values that can be used in unit tests.
BAYESTREE BayesTreeType
The BayesTree type produced by elimination.
Definition: ClusterTree.h:34
boost::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
Definition: EliminateableFactorGraph.h:89
Keys keys
Frontal keys of this node.
Definition: ClusterTree.h:44
const FastVector< sharedFactor > & remainingFactors() const
Return the remaining factors that are not pulled into elimination.
Definition: ClusterTree.h:104
boost::shared_ptr< ConditionalType > sharedConditional
Shared pointer to a conditional.
Definition: ClusterTree.h:36
ClusterTree()
Default constructor to be used in derived classes.
Definition: ClusterTree.h:116
This & operator=(const This &other)
Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are copie...
Definition: ClusterTree-inst.h:141
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Print the cluster tree.
Definition: ClusterTree-inst.h:133
Factors factors
Factors associated with this node.
Definition: ClusterTree.h:45
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition: DiscreteConditional.h:33
GRAPH FactorGraphType
The factor graph type.
Definition: ClusterTree.h:29
Children children
sub-trees
Definition: ClusterTree.h:46
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print this node
Definition: ClusterTree-inst.h:122
sharedCluster sharedNode
Define Node=Cluster for compatibility with tree traversal functions.
Definition: ClusterTree.h:57
A thin wrapper around std::vector that uses boost's pool_allocator.
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: types.h:62
BayesTreeType::ConditionalType ConditionalType
The type of conditionals.
Definition: ClusterTree.h:35
A cluster-tree is associated with a factor graph and is defined as in Koller-Friedman: each node k re...
Definition: BayesTree.h:33