diff --git a/packages/CLPBN/horus/ElimGraph.cpp b/packages/CLPBN/horus/ElimGraph.cpp index cabc9ef1c..128b1fd0a 100644 --- a/packages/CLPBN/horus/ElimGraph.cpp +++ b/packages/CLPBN/horus/ElimGraph.cpp @@ -6,7 +6,8 @@ namespace Horus { -ElimHeuristic ElimGraph::elimHeuristic_ = minNeighborsEh; +ElimGraph::ElimHeuristic ElimGraph::elimHeuristic_ = + ElimHeuristic::minNeighborsEh; ElimGraph::ElimGraph (const std::vector& factors) diff --git a/packages/CLPBN/horus/ElimGraph.h b/packages/CLPBN/horus/ElimGraph.h index cf53cbe59..8b97fe2f3 100644 --- a/packages/CLPBN/horus/ElimGraph.h +++ b/packages/CLPBN/horus/ElimGraph.h @@ -18,15 +18,6 @@ class EGNode; typedef TinySet EGNeighs; -enum ElimHeuristic { - sequentialEh, - minNeighborsEh, - minWeightEh, - minFillEh, - weightedMinFillEh -}; - - class EGNode : public Var { public: EGNode (VarId vid, unsigned range) : Var (vid, range) { } @@ -46,6 +37,14 @@ class EGNode : public Var { class ElimGraph { public: + enum ElimHeuristic { + sequentialEh, + minNeighborsEh, + minWeightEh, + minFillEh, + weightedMinFillEh + }; + ElimGraph (const Factors&); ~ElimGraph (void); diff --git a/packages/CLPBN/horus/Util.cpp b/packages/CLPBN/horus/Util.cpp index a4b6ebf1d..472dc4f74 100644 --- a/packages/CLPBN/horus/Util.cpp +++ b/packages/CLPBN/horus/Util.cpp @@ -226,15 +226,15 @@ setHorusFlag (std::string option, std::string value) } else if (option == "hve_elim_heuristic") { if (value == "sequential") - ElimGraph::setElimHeuristic (ElimHeuristic::sequentialEh); + ElimGraph::setElimHeuristic (ElimGraph::ElimHeuristic::sequentialEh); else if (value == "min_neighbors") - ElimGraph::setElimHeuristic (ElimHeuristic::minNeighborsEh); + ElimGraph::setElimHeuristic (ElimGraph::ElimHeuristic::minNeighborsEh); else if (value == "min_weight") - ElimGraph::setElimHeuristic (ElimHeuristic::minWeightEh); + ElimGraph::setElimHeuristic (ElimGraph::ElimHeuristic::minWeightEh); else if (value == "min_fill") - ElimGraph::setElimHeuristic (ElimHeuristic::minFillEh); + ElimGraph::setElimHeuristic (ElimGraph::ElimHeuristic::minFillEh); else if (value == "weighted_min_fill") - ElimGraph::setElimHeuristic (ElimHeuristic::weightedMinFillEh); + ElimGraph::setElimHeuristic (ElimGraph::ElimHeuristic::weightedMinFillEh); else returnVal = invalidValue (option, value); diff --git a/packages/CLPBN/horus/VarElim.cpp b/packages/CLPBN/horus/VarElim.cpp index ecef79f7f..777b8b63b 100644 --- a/packages/CLPBN/horus/VarElim.cpp +++ b/packages/CLPBN/horus/VarElim.cpp @@ -42,12 +42,13 @@ VarElim::printSolverFlags (void) const std::stringstream ss; ss << "variable elimination [" ; ss << "elim_heuristic=" ; + typedef ElimGraph::ElimHeuristic EGEH; switch (ElimGraph::elimHeuristic()) { - case ElimHeuristic::sequentialEh: ss << "sequential"; break; - case ElimHeuristic::minNeighborsEh: ss << "min_neighbors"; break; - case ElimHeuristic::minWeightEh: ss << "min_weight"; break; - case ElimHeuristic::minFillEh: ss << "min_fill"; break; - case ElimHeuristic::weightedMinFillEh: ss << "weighted_min_fill"; break; + case EGEH::sequentialEh: ss << "sequential"; break; + case EGEH::minNeighborsEh: ss << "min_neighbors"; break; + case EGEH::minWeightEh: ss << "min_weight"; break; + case EGEH::minFillEh: ss << "min_fill"; break; + case EGEH::weightedMinFillEh: ss << "weighted_min_fill"; break; } ss << ",log_domain=" << Util::toString (Globals::logDomain); ss << "]" ;