Merge branch 'master' of https://github.com/tacgomes/yap6.3
This commit is contained in:
commit
9b4b33bb3c
@ -21,6 +21,16 @@ enum class LogVarType {
|
||||
negLvt
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Workaround GCC bug #38064
|
||||
inline bool operator< (LogVarType lvt1, LogVarType lvt2)
|
||||
{
|
||||
return (int)lvt1 < (int)lvt2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef long LiteralId;
|
||||
typedef std::vector<LogVarType> LogVarTypes;
|
||||
|
||||
|
@ -118,21 +118,24 @@ ParfactorList::isAllShattered() const
|
||||
|
||||
|
||||
|
||||
struct sortByParams {
|
||||
bool operator() (const Parfactor* pf1, const Parfactor* pf2) const
|
||||
{
|
||||
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() 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;
|
||||
}
|
||||
};
|
||||
Parfactors pfVec (pfList_.begin(), pfList_.end());
|
||||
std::sort (pfVec.begin(), pfVec.end(), sortByParams());
|
||||
for (size_t i = 0; i < pfVec.size(); i++) {
|
||||
|
Reference in New Issue
Block a user