Move sortByParams to source file

This commit is contained in:
Tiago Gomes 2013-02-21 00:13:11 +00:00
parent 59c6f5c243
commit 0991a84793
2 changed files with 19 additions and 13 deletions

View File

@ -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
{

View File

@ -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<Parfactor*> pfList_;
};