Commit f10c3639 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Types] ClusterNode

parent 3804ecd2
...@@ -68,11 +68,6 @@ import qualified Data.Map.Strict as Map ...@@ -68,11 +68,6 @@ import qualified Data.Map.Strict as Map
---------------------------------------------------------------- ----------------------------------------------------------------
data ClusterNode = ClusterNode
{ cl_node_id :: Int
, cl_community_id :: Int
} deriving Show
defaultClustering :: Map (Int, Int) Double -> [ClusterNode] defaultClustering :: Map (Int, Int) Double -> [ClusterNode]
defaultClustering adjmap = withG g $ \fg -> defaultClustering adjmap = withG g $ \fg ->
case clusteringOptim len fg beta gc of case clusteringOptim len fg beta gc of
......
...@@ -21,6 +21,7 @@ import Data.IntMap (IntMap) ...@@ -21,6 +21,7 @@ import Data.IntMap (IntMap)
import qualified Data.Matrix.Sparse.Static as Sparse import qualified Data.Matrix.Sparse.Static as Sparse
import qualified Data.Vector.Unboxed as VU import qualified Data.Vector.Unboxed as VU
import qualified Numeric.LinearAlgebra.Static as Dense import qualified Numeric.LinearAlgebra.Static as Dense
import Protolude hiding (sum, natVal)
-- | Main Types use in this libray -- | Main Types use in this libray
...@@ -32,3 +33,11 @@ type Graph a b = DGIP.Gr a b ...@@ -32,3 +33,11 @@ type Graph a b = DGIP.Gr a b
-- | Type for Matrix computation optimizations (with Eigen) -- | Type for Matrix computation optimizations (with Eigen)
type MatrixD n = Dense.L n n type MatrixD n = Dense.L n n
type MatrixS n = Sparse.Matrix n n Double type MatrixS n = Sparse.Matrix n n Double
data ClusterNode = ClusterNode
{ cl_node_id :: Int
, cl_community_id :: Int
} deriving Show
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