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