21 #include <boost/shared_ptr.hpp> 50 template<
class BAYESNET,
class GRAPH>
74 sharedFactor
eliminate(
const boost::shared_ptr<BayesNetType>& output,
129 std::pair<boost::shared_ptr<BayesNetType>, boost::shared_ptr<FactorGraphType> >
137 void print(
const std::string&
name =
"EliminationTree: ",
142 bool equals(
const This& other,
double tol = 1
e-9)
const;
157 void swap(This& other);
165 friend class ::EliminationTreeTester;
FastVector< sharedNode > roots_
Factors factors
factors associated with root
boost::shared_ptr< ConditionalType > sharedConditional
Shared pointer to a conditional.
Concept check for values that can be used in unit tests.
GRAPH FactorGraphType
The factor graph type.
void print(const std::string &str, const KeyFormatter &keyFormatter) const
bool equals(const This &other, double tol=1e-9) const
sharedFactor eliminate(const boost::shared_ptr< BayesNetType > &output, const Eliminate &function, const FastVector< sharedFactor > &childrenFactors) const
Children children
sub-trees
static const KeyFormatter DefaultKeyFormatter
const KeyFormatter & formatter
boost::shared_ptr< This > shared_ptr
Shared pointer to this class.
boost::shared_ptr< Node > sharedNode
Shared pointer to Node.
EliminationTree()
Protected default constructor.
GRAPH::Eliminate Eliminate
const FastVector< sharedFactor > & remainingFactors() const
FastVector< sharedFactor > Factors
BayesNetType::ConditionalType ConditionalType
The type of conditionals.
boost::shared_ptr< FactorType > sharedFactor
Shared pointer to a factor.
EliminationTree(const This &other)
EliminationTree< BAYESNET, GRAPH > This
This class.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const FastVector< sharedNode > & roots() const
Key key
key associated with root
A thin wrapper around std::vector that uses a custom allocator.
FastVector< sharedFactor > remainingFactors_
GTSAM_CONCEPT_TESTABLE_TYPE(FactorType)
BAYESNET BayesNetType
The BayesNet corresponding to FACTOR.
This & operator=(const This &other)
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
Annotation for function names.
GRAPH::FactorType FactorType
The type of factors.
std::uint64_t Key
Integer nonlinear key type.
FastVector< boost::shared_ptr< Node > > Children