From bff56c75caff1788e54d5e123e29149007b1906a Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Fri, 8 Feb 2013 01:11:18 +0000 Subject: [PATCH] Trivial --- packages/CLPBN/horus/ConstraintTree.h | 4 ++-- packages/CLPBN/horus/CountingBp.h | 9 ++++++--- packages/CLPBN/horus/FactorGraph.h | 6 ++---- packages/CLPBN/horus/LiftedWCNF.h | 4 +++- packages/CLPBN/horus/ParfactorList.h | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/CLPBN/horus/ConstraintTree.h b/packages/CLPBN/horus/ConstraintTree.h index 101f5ec53..a3585bb63 100644 --- a/packages/CLPBN/horus/ConstraintTree.h +++ b/packages/CLPBN/horus/ConstraintTree.h @@ -18,8 +18,8 @@ class CTNode; class ConstraintTree; -typedef std::vector CTNodes; -typedef std::vector ConstraintTrees; +typedef std::vector CTNodes; +typedef std::vector ConstraintTrees; class CTNode diff --git a/packages/CLPBN/horus/CountingBp.h b/packages/CLPBN/horus/CountingBp.h index cdfeea824..a9909455e 100644 --- a/packages/CLPBN/horus/CountingBp.h +++ b/packages/CLPBN/horus/CountingBp.h @@ -48,8 +48,10 @@ template struct hash> { return horus::hash_combine (std::hash()(p.first), p.second); }}; -template struct hash> { - size_t operator() (const std::vector& vec) const { +template struct hash> +{ + size_t operator() (const std::vector& vec) const + { size_t h = 0; typename std::vector::const_iterator first = vec.begin(); typename std::vector::const_iterator last = vec.end(); @@ -57,7 +59,8 @@ template struct hash> { h = horus::hash_combine (h, *first); } return h; -}}; + } +}; } // namespace std diff --git a/packages/CLPBN/horus/FactorGraph.h b/packages/CLPBN/horus/FactorGraph.h index 1e5caccb6..c5c7da512 100644 --- a/packages/CLPBN/horus/FactorGraph.h +++ b/packages/CLPBN/horus/FactorGraph.h @@ -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 diff --git a/packages/CLPBN/horus/LiftedWCNF.h b/packages/CLPBN/horus/LiftedWCNF.h index 4ea32ce70..81e293604 100644 --- a/packages/CLPBN/horus/LiftedWCNF.h +++ b/packages/CLPBN/horus/LiftedWCNF.h @@ -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; diff --git a/packages/CLPBN/horus/ParfactorList.h b/packages/CLPBN/horus/ParfactorList.h index 539eb1dca..e1b3a5324 100644 --- a/packages/CLPBN/horus/ParfactorList.h +++ b/packages/CLPBN/horus/ParfactorList.h @@ -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;