Commit 741514c3 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[FLouvain] fix tests

parent 70e38ea9
......@@ -4,7 +4,7 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: 70b34ec62fea08353f69f29cc103940feb22097a32b1f061446843b348e5f727
-- hash: e6499237b0dc8ea9c12e2947a7c59bbd3dcc7a327e44c0d2d4ee5fff351e6ac6
name: clustering-louvain
version: 0.1.0.0
......@@ -23,6 +23,7 @@ library
Data.Graph.Clustering.FLouvain
Data.Graph.Clustering.Louvain
Data.Graph.Clustering.Louvain.Utils
Data.Graph.Clustering.Louvain.Types
Data.Graph.Clustering.Louvain.IO.Gexf
Data.Graph.Clustering.Louvain.CplusPlus
Data.Graph.FGL
......@@ -30,7 +31,6 @@ library
Data.Graph.Clustering.Example
Data.Graph.Clustering.HLouvain
Data.Graph.Clustering.ILouvain
Data.Graph.Clustering.Louvain.Types
Paths_clustering_louvain
hs-source-dirs:
src
......
......@@ -39,6 +39,7 @@ library:
- Data.Graph.Clustering.FLouvain
- Data.Graph.Clustering.Louvain
- Data.Graph.Clustering.Louvain.Utils
- Data.Graph.Clustering.Louvain.Types
- Data.Graph.Clustering.Louvain.IO.Gexf
- Data.Graph.Clustering.Louvain.CplusPlus
- Data.Graph.FGL
......
......@@ -12,6 +12,7 @@ import Data.List ((!!))
import Data.Graph.Clustering.FLouvain
import Data.Graph.Clustering.Louvain.Utils (mkFGraph, mkFGraph')
import Data.Graph.Clustering.Louvain.Types
import Data.Graph.FGL
-- 1 -> 2 -> 3
......@@ -116,8 +117,8 @@ spec = do
newCom2 = moveNodeWithContext ctx1 Into com2
intoOutOf ctx com = moveNodeWithContext ctx OutOf $ moveNodeWithContext ctx Into com
outOfInto ctx com = moveNodeWithContext ctx Into $ moveNodeWithContext ctx OutOf com
newCom1 `shouldBe` Community ([], InWeightSum 0.0, TotWeightSum 0.0)
newCom2 `shouldBe` Community ([1, 2], InWeightSum 1.0, TotWeightSum 0.5)
newCom1 `shouldBe` Community ([], InWeightSum 0.0, TotWeightSum 0.0, comLabel newCom1)
newCom2 `shouldBe` Community ([1, 2], InWeightSum 1.0, TotWeightSum 0.5, comLabel newCom1)
-- TODO moveNodeWithContext ctx Into (moveNodeWithContext ctx OutOf) is an
-- identity, this can be used in QuickCheck testing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment