This commit is contained in:
Tiago Gomes 2013-02-08 01:11:18 +00:00
parent 98842dca74
commit bff56c75ca
5 changed files with 14 additions and 11 deletions

View File

@ -18,8 +18,8 @@ class CTNode;
class ConstraintTree;
typedef std::vector<CTNode*> CTNodes;
typedef std::vector<ConstraintTree*> ConstraintTrees;
typedef std::vector<CTNode*> CTNodes;
typedef std::vector<ConstraintTree*> ConstraintTrees;
class CTNode

View File

@ -48,8 +48,10 @@ template <typename T1, typename T2> struct hash<std::pair<T1,T2>> {
return horus::hash_combine (std::hash<T1>()(p.first), p.second);
}};
template <typename T> struct hash<std::vector<T>> {
size_t operator() (const std::vector<T>& vec) const {
template <typename T> struct hash<std::vector<T>>
{
size_t operator() (const std::vector<T>& vec) const
{
size_t h = 0;
typename std::vector<T>::const_iterator first = vec.begin();
typename std::vector<T>::const_iterator last = vec.end();
@ -57,7 +59,8 @@ template <typename T> struct hash<std::vector<T>> {
h = horus::hash_combine (h, *first);
}
return h;
}};
}
};
} // namespace std

View File

@ -175,12 +175,10 @@ FactorGraph::getVarNode (VarId vid) const
struct sortByVarId
{
struct sortByVarId {
bool operator()(VarNode* vn1, VarNode* vn2) {
return vn1->varId() < vn2->varId();
}
};
}};
} // namespace horus

View File

@ -186,7 +186,9 @@ class LitLvTypes
struct CmpLitLvTypes
{
bool operator() (const LitLvTypes& types1, const LitLvTypes& types2) const
bool operator() (
const LitLvTypes& types1,
const LitLvTypes& types2) const
{
if (types1.lid() < types2.lid()) {
return true;

View File

@ -105,7 +105,7 @@ class ParfactorList
struct sortByParams
{
inline bool operator() (const Parfactor* pf1, const Parfactor* pf2)
bool operator() (const Parfactor* pf1, const Parfactor* pf2)
{
if (pf1->params().size() < pf2->params().size()) {
return true;