modularity-0.2.1.1: Find the modularity of a network.

Safe HaskellNone
LanguageHaskell2010

Math.Modularity.Dense

Synopsis

Documentation

getModularity :: LabelVector -> AdjacencyMatrix -> Q Source #

Find modularity from a vector of community labels (0 or 1) corresponding to rows in the adjacency matrix. Needs 0s on the diagonal for the adjacency matrix.

getBModularity :: LabelVector -> B -> Q Source #

Find modularity from a vector of community labels (0 or 1) corresponding to rows in the normalized matrix B. See Shu et al., "Efficient Spectral Neighborhood Blocking for Entity Resolution", 2011. L = sum_i^n sum_j^n A(i,j) - n = 1^TA1 - n = (B^T1)^T(B^T1) - n.

newtype Q Source #

Constructors

Q 

Fields

Instances
Eq Q Source # 
Instance details

Defined in Math.Modularity.Types

Methods

(==) :: Q -> Q -> Bool #

(/=) :: Q -> Q -> Bool #

Num Q Source # 
Instance details

Defined in Math.Modularity.Types

Methods

(+) :: Q -> Q -> Q #

(-) :: Q -> Q -> Q #

(*) :: Q -> Q -> Q #

negate :: Q -> Q #

abs :: Q -> Q #

signum :: Q -> Q #

fromInteger :: Integer -> Q #

Ord Q Source # 
Instance details

Defined in Math.Modularity.Types

Methods

compare :: Q -> Q -> Ordering #

(<) :: Q -> Q -> Bool #

(<=) :: Q -> Q -> Bool #

(>) :: Q -> Q -> Bool #

(>=) :: Q -> Q -> Bool #

max :: Q -> Q -> Q #

min :: Q -> Q -> Q #

Read Q Source # 
Instance details

Defined in Math.Modularity.Types

Show Q Source # 
Instance details

Defined in Math.Modularity.Types

Methods

showsPrec :: Int -> Q -> ShowS #

show :: Q -> String #

showList :: [Q] -> ShowS #

Generic Q Source # 
Instance details

Defined in Math.Modularity.Types

Associated Types

type Rep Q :: Type -> Type #

Methods

from :: Q -> Rep Q x #

to :: Rep Q x -> Q #

type Rep Q Source # 
Instance details

Defined in Math.Modularity.Types

type Rep Q = D1 (MetaData "Q" "Math.Modularity.Types" "modularity-0.2.1.1-6jxdPEpeROD1yI6Imv5D6P" True) (C1 (MetaCons "Q" PrefixI True) (S1 (MetaSel (Just "unQ") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))