33 struct EliminationData {
36 EliminationData(EliminationData* _parentData,
size_t nChildren) :
42 EliminationData<TREE> eliminationPreOrderVisitor(
47 return EliminationData<TREE>(&
parentData, node->children.size());
51 template<
class TREE,
class RESULT>
52 struct EliminationPostOrderVisitor
62 if(childFactor && !childFactor->empty())
63 myData.parentData->childFactors.push_back(childFactor);
72 template<
class TREE,
class RESULT>
73 FastVector<typename TREE::sharedFactor>
82 EliminationData<TREE> rootData(0,
tree.roots().size());
83 EliminationPostOrderVisitor<TREE,RESULT> visitorPost(
result,
function);
87 return rootData.childFactors;