From 0991a84793796457ec84d9f049cd23b6cc750245 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Thu, 21 Feb 2013 00:13:11 +0000 Subject: [PATCH] Move sortByParams to source file --- packages/CLPBN/horus/ParfactorList.cpp | 19 +++++++++++++++++++ packages/CLPBN/horus/ParfactorList.h | 13 ------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/packages/CLPBN/horus/ParfactorList.cpp b/packages/CLPBN/horus/ParfactorList.cpp index 06752d396..81d8a7631 100644 --- a/packages/CLPBN/horus/ParfactorList.cpp +++ b/packages/CLPBN/horus/ParfactorList.cpp @@ -118,6 +118,25 @@ ParfactorList::isAllShattered (void) const +namespace { + +struct sortByParams { + bool operator() (const Parfactor* pf1, const Parfactor* pf2) + { + if (pf1->params().size() < pf2->params().size()) { + return true; + } else if (pf1->params().size() == pf2->params().size() && + pf1->params() < pf2->params()) { + return true; + } + return false; + } +}; + +} + + + void ParfactorList::print (void) const { diff --git a/packages/CLPBN/horus/ParfactorList.h b/packages/CLPBN/horus/ParfactorList.h index d205688ee..3e57f305e 100644 --- a/packages/CLPBN/horus/ParfactorList.h +++ b/packages/CLPBN/horus/ParfactorList.h @@ -102,19 +102,6 @@ class ParfactorList { const ProbFormula&, ConstraintTree, const ProbFormula&, ConstraintTree) const; - struct sortByParams { - bool operator() (const Parfactor* pf1, const Parfactor* pf2) - { - if (pf1->params().size() < pf2->params().size()) { - return true; - } else if (pf1->params().size() == pf2->params().size() && - pf1->params() < pf2->params()) { - return true; - } - return false; - } - }; - std::list pfList_; };