Added debug printing switches in EliminationTree
parent
0fdc384089
commit
28f283f016
|
|
@ -26,6 +26,10 @@ template<class FACTOR>
|
||||||
typename EliminationTree<FACTOR>::sharedFactor
|
typename EliminationTree<FACTOR>::sharedFactor
|
||||||
EliminationTree<FACTOR>::eliminate_(Conditionals& conditionals) const {
|
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;
|
set<Index, std::less<Index>, boost::fast_pool_allocator<Index> > separator;
|
||||||
|
|
||||||
// Create the list of factors to be eliminated, initially empty, and reserve space
|
// 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
|
typename EliminationTree<FACTOR>::shared_ptr
|
||||||
EliminationTree<FACTOR>::Create(const FactorGraph<DERIVEDFACTOR>& factorGraph, const VariableIndex& structure) {
|
EliminationTree<FACTOR>::Create(const FactorGraph<DERIVEDFACTOR>& factorGraph, const VariableIndex& structure) {
|
||||||
|
|
||||||
|
static const bool debug = false;
|
||||||
|
|
||||||
tic("ET 1: Create");
|
tic("ET 1: Create");
|
||||||
|
|
||||||
tic("ET 1.1: ComputeParents");
|
tic("ET 1.1: ComputeParents");
|
||||||
|
|
@ -128,6 +134,9 @@ EliminationTree<FACTOR>::Create(const FactorGraph<DERIVEDFACTOR>& factorGraph, c
|
||||||
assert((*tree) != shared_ptr());
|
assert((*tree) != shared_ptr());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(debug)
|
||||||
|
trees.back()->print("ETree: ");
|
||||||
|
|
||||||
return trees.back();
|
return trees.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue