Added debug printing switches in EliminationTree

release/4.3a0
Richard Roberts 2010-11-19 16:28:10 +00:00
parent 0fdc384089
commit 28f283f016
1 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,10 @@ template<class FACTOR>
typename EliminationTree<FACTOR>::sharedFactor
EliminationTree<FACTOR>::eliminate_(Conditionals& conditionals) const {
static const bool debug = false;
if(debug) cout << "ETree: eliminating " << this->key_ << endl;
set<Index, std::less<Index>, boost::fast_pool_allocator<Index> > separator;
// Create the list of factors to be eliminated, initially empty, and reserve space
@ -86,6 +90,8 @@ template<class DERIVEDFACTOR>
typename EliminationTree<FACTOR>::shared_ptr
EliminationTree<FACTOR>::Create(const FactorGraph<DERIVEDFACTOR>& factorGraph, const VariableIndex& structure) {
static const bool debug = false;
tic("ET 1: Create");
tic("ET 1.1: ComputeParents");
@ -128,6 +134,9 @@ EliminationTree<FACTOR>::Create(const FactorGraph<DERIVEDFACTOR>& factorGraph, c
assert((*tree) != shared_ptr());
#endif
if(debug)
trees.back()->print("ETree: ");
return trees.back();
}