Trivial
This commit is contained in:
parent
98842dca74
commit
bff56c75ca
@ -18,8 +18,8 @@ class CTNode;
|
|||||||
class ConstraintTree;
|
class ConstraintTree;
|
||||||
|
|
||||||
|
|
||||||
typedef std::vector<CTNode*> CTNodes;
|
typedef std::vector<CTNode*> CTNodes;
|
||||||
typedef std::vector<ConstraintTree*> ConstraintTrees;
|
typedef std::vector<ConstraintTree*> ConstraintTrees;
|
||||||
|
|
||||||
|
|
||||||
class CTNode
|
class CTNode
|
||||||
|
@ -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);
|
return horus::hash_combine (std::hash<T1>()(p.first), p.second);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
template <typename T> struct hash<std::vector<T>> {
|
template <typename T> struct hash<std::vector<T>>
|
||||||
size_t operator() (const std::vector<T>& vec) const {
|
{
|
||||||
|
size_t operator() (const std::vector<T>& vec) const
|
||||||
|
{
|
||||||
size_t h = 0;
|
size_t h = 0;
|
||||||
typename std::vector<T>::const_iterator first = vec.begin();
|
typename std::vector<T>::const_iterator first = vec.begin();
|
||||||
typename std::vector<T>::const_iterator last = vec.end();
|
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);
|
h = horus::hash_combine (h, *first);
|
||||||
}
|
}
|
||||||
return h;
|
return h;
|
||||||
}};
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
@ -175,12 +175,10 @@ FactorGraph::getVarNode (VarId vid) const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct sortByVarId
|
struct sortByVarId {
|
||||||
{
|
|
||||||
bool operator()(VarNode* vn1, VarNode* vn2) {
|
bool operator()(VarNode* vn1, VarNode* vn2) {
|
||||||
return vn1->varId() < vn2->varId();
|
return vn1->varId() < vn2->varId();
|
||||||
}
|
}};
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace horus
|
} // namespace horus
|
||||||
|
|
||||||
|
@ -186,7 +186,9 @@ class LitLvTypes
|
|||||||
|
|
||||||
struct CmpLitLvTypes
|
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()) {
|
if (types1.lid() < types2.lid()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -105,7 +105,7 @@ class ParfactorList
|
|||||||
|
|
||||||
struct sortByParams
|
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()) {
|
if (pf1->params().size() < pf2->params().size()) {
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user