-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Find the modularity of a network. -- -- Report Q, the Newman-Girvan modularity of an adjacency matrix. @package modularity @version 0.2.0.3 module Math.Modularity.Types newtype Q Q :: Double -> Q [unQ] :: Q -> Double instance GHC.Generics.Generic Math.Modularity.Types.Q instance GHC.Num.Num Math.Modularity.Types.Q instance GHC.Show.Show Math.Modularity.Types.Q instance GHC.Read.Read Math.Modularity.Types.Q instance GHC.Classes.Ord Math.Modularity.Types.Q instance GHC.Classes.Eq Math.Modularity.Types.Q module Math.Modularity.Sparse -- | 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. getModularity :: LabelVector -> AdjacencyMatrix -> Q -- | 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. getBModularity :: LabelVector -> B -> Q newtype Q Q :: Double -> Q [unQ] :: Q -> Double -- | Test whether getModularity BB^T is the same as getBModularity B. testModularity :: (Bool, Q, Q) module Math.Modularity.Eigen.Sparse -- | 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. getModularity :: LabelVector -> AdjacencyMatrix -> Q -- | 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. getBModularity :: LabelVector -> B -> Q newtype Q Q :: Double -> Q [unQ] :: Q -> Double -- | Test whether getModularity BB^T is the same as getBModularity B. testModularity :: (Bool, Q, Q) module Math.Modularity.Dense -- | 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. getModularity :: LabelVector -> AdjacencyMatrix -> Q newtype Q Q :: Double -> Q [unQ] :: Q -> Double