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