Trivial
This commit is contained in:
parent
98842dca74
commit
bff56c75ca
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user