-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell interface of the igraph library. -- -- igraph"http://igraph.org/c/" is a library for creating and -- manipulating large graphs. This package provides the Haskell interface -- of igraph. @package haskell-igraph @version 0.4.0 module IGraph.Internal.Arpack igraphArpackNew :: IO ((ArpackOpt)) newtype ArpackOpt ArpackOpt :: (ForeignPtr (ArpackOpt)) -> ArpackOpt withArpackOpt :: ArpackOpt -> (Ptr ArpackOpt -> IO b) -> IO b igraphArpackNew'_ :: ((Ptr (ArpackOpt)) -> (IO ())) module IGraph.Internal.Constants data Neimode IgraphOut :: Neimode IgraphIn :: Neimode IgraphAll :: Neimode IgraphTotal :: Neimode data EdgeOrderType IgraphEdgeorderId :: EdgeOrderType IgraphEdgeorderFrom :: EdgeOrderType IgraphEdgeorderTo :: EdgeOrderType data SpincommUpdate IgraphSpincommUpdateSimple :: SpincommUpdate IgraphSpincommUpdateConfig :: SpincommUpdate data SpinglassImplementation IgraphSpincommImpOrig :: SpinglassImplementation IgraphSpincommImpNeg :: SpinglassImplementation data AttributeElemtype IgraphAttributeGraph :: AttributeElemtype IgraphAttributeVertex :: AttributeElemtype IgraphAttributeEdge :: AttributeElemtype data SubgraphImplementation IgraphSubgraphAuto :: SubgraphImplementation IgraphSubgraphCopyAndDelete :: SubgraphImplementation IgraphSubgraphCreateFromScratch :: SubgraphImplementation data PagerankAlgo IgraphPagerankAlgoPower :: PagerankAlgo IgraphPagerankAlgoArpack :: PagerankAlgo IgraphPagerankAlgoPrpack :: PagerankAlgo data ErdosRenyi IgraphErdosRenyiGnp :: ErdosRenyi IgraphErdosRenyiGnm :: ErdosRenyi data Rewiring IgraphRewiringSimple :: Rewiring IgraphRewiringSimpleLoops :: Rewiring data Degseq IgraphDegseqSimple :: Degseq IgraphDegseqVl :: Degseq IgraphDegseqSimpleNoMultiple :: Degseq instance GHC.Classes.Eq IGraph.Internal.Constants.Degseq instance GHC.Read.Read IGraph.Internal.Constants.Degseq instance GHC.Show.Show IGraph.Internal.Constants.Degseq instance GHC.Classes.Eq IGraph.Internal.Constants.Rewiring instance GHC.Read.Read IGraph.Internal.Constants.Rewiring instance GHC.Show.Show IGraph.Internal.Constants.Rewiring instance GHC.Classes.Eq IGraph.Internal.Constants.ErdosRenyi instance GHC.Read.Read IGraph.Internal.Constants.ErdosRenyi instance GHC.Show.Show IGraph.Internal.Constants.ErdosRenyi instance GHC.Classes.Eq IGraph.Internal.Constants.PagerankAlgo instance GHC.Read.Read IGraph.Internal.Constants.PagerankAlgo instance GHC.Show.Show IGraph.Internal.Constants.PagerankAlgo instance GHC.Classes.Eq IGraph.Internal.Constants.SubgraphImplementation instance GHC.Read.Read IGraph.Internal.Constants.SubgraphImplementation instance GHC.Show.Show IGraph.Internal.Constants.SubgraphImplementation instance GHC.Classes.Eq IGraph.Internal.Constants.AttributeElemtype instance GHC.Show.Show IGraph.Internal.Constants.AttributeElemtype instance GHC.Classes.Eq IGraph.Internal.Constants.SpinglassImplementation instance GHC.Show.Show IGraph.Internal.Constants.SpinglassImplementation instance GHC.Classes.Eq IGraph.Internal.Constants.SpincommUpdate instance GHC.Show.Show IGraph.Internal.Constants.SpincommUpdate instance GHC.Classes.Eq IGraph.Internal.Constants.EdgeOrderType instance GHC.Show.Show IGraph.Internal.Constants.EdgeOrderType instance GHC.Classes.Eq IGraph.Internal.Constants.Neimode instance GHC.Show.Show IGraph.Internal.Constants.Neimode instance GHC.Enum.Enum IGraph.Internal.Constants.Degseq instance GHC.Enum.Enum IGraph.Internal.Constants.Rewiring instance GHC.Enum.Enum IGraph.Internal.Constants.ErdosRenyi instance GHC.Enum.Enum IGraph.Internal.Constants.PagerankAlgo instance GHC.Enum.Enum IGraph.Internal.Constants.SubgraphImplementation instance GHC.Enum.Enum IGraph.Internal.Constants.AttributeElemtype instance GHC.Enum.Enum IGraph.Internal.Constants.SpinglassImplementation instance GHC.Enum.Enum IGraph.Internal.Constants.SpincommUpdate instance GHC.Enum.Enum IGraph.Internal.Constants.EdgeOrderType instance GHC.Enum.Enum IGraph.Internal.Constants.Neimode module IGraph.Internal.Data newtype Vector Vector :: (ForeignPtr (Vector)) -> Vector withVector :: Vector -> (Ptr Vector -> IO b) -> IO b igraphVectorNew :: (Int) -> IO ((Vector)) fromList :: [Double] -> IO Vector toList :: Vector -> IO [Double] igraphVectorNull :: (Vector) -> IO () igraphVectorFill :: (Vector) -> (Double) -> IO () igraphVectorE :: (Vector) -> (Int) -> (Double) igraphVectorSet :: (Vector) -> (Int) -> (Double) -> IO () igraphVectorTail :: (Vector) -> (Double) igraphVectorSize :: (Vector) -> IO ((Int)) igraphVectorCopyTo :: (Vector) -> (Ptr CDouble) -> IO () newtype VectorPtr VectorPtr :: (ForeignPtr (VectorPtr)) -> VectorPtr withVectorPtr :: VectorPtr -> (Ptr VectorPtr -> IO b) -> IO b igraphVectorPtrNew :: (Int) -> IO ((VectorPtr)) fromPtrs :: [Ptr ()] -> IO VectorPtr toLists :: VectorPtr -> IO [[Double]] newtype StrVector StrVector :: (ForeignPtr (StrVector)) -> StrVector withStrVector :: StrVector -> (Ptr StrVector -> IO b) -> IO b igraphStrvectorNew :: (Int) -> IO ((StrVector)) igraphStrvectorGet :: (StrVector) -> (Int) -> IO ((String)) toStrVector :: [ByteString] -> IO StrVector newtype BSLen BSLen :: CStringLen -> BSLen newtype BSVector BSVector :: (ForeignPtr (BSVector)) -> BSVector withBSVector :: BSVector -> (Ptr BSVector -> IO b) -> IO b bsvectorNew :: (Int) -> IO ((BSVector)) bsvectorSet :: (BSVector) -> (Int) -> (Ptr ()) -> IO () toBSVector :: [BSLen] -> IO BSVector newtype Matrix Matrix :: (ForeignPtr (Matrix)) -> Matrix withMatrix :: Matrix -> (Ptr Matrix -> IO b) -> IO b igraphMatrixNew :: (Int) -> (Int) -> IO ((Matrix)) igraphMatrixNull :: (Matrix) -> IO () igraphMatrixFill :: (Matrix) -> (Double) -> IO () igraphMatrixE :: (Matrix) -> (Int) -> (Int) -> IO ((Double)) igraphMatrixSet :: (Matrix) -> (Int) -> (Int) -> (Double) -> IO () igraphMatrixCopyTo :: (Matrix) -> (Ptr CDouble) -> IO () igraphMatrixNrow :: (Matrix) -> IO ((Int)) igraphMatrixNcol :: (Matrix) -> IO ((Int)) fromRowLists :: [[Double]] -> IO Matrix toRowLists :: Matrix -> IO [[Double]] toColumnLists :: Matrix -> IO [[Double]] instance Foreign.Storable.Storable IGraph.Internal.Data.BSLen module IGraph.Internal.Initialization data HasInit igraphInit :: IO HasInit haskelligraphInit :: IO () haskelligraphInit'_ :: (IO ()) module IGraph.Internal.Graph newtype IGraph IGraph :: (ForeignPtr (IGraph)) -> IGraph withIGraph :: IGraph -> (Ptr IGraph -> IO b) -> IO b igraphNew' :: (Int) -> (Bool) -> IO ((IGraph)) igraphCopy :: (IGraph) -> IO ((IGraph)) -- | Create a igraph object and attach a finalizer igraphNew :: Int -> Bool -> HasInit -> IO IGraph igraphVcount :: (IGraph) -> IO ((Int)) igraphEcount :: (IGraph) -> IO ((Int)) igraphGetEid :: (IGraph) -> (Int) -> (Int) -> (Bool) -> (Bool) -> IO ((Int)) igraphEdge :: (IGraph) -> (Int) -> IO ((Int), (Int)) igraphAddVertices :: (IGraph) -> (Int) -> (Ptr ()) -> IO () igraphAddEdge :: (IGraph) -> (Int) -> (Int) -> IO () -- | The edges are given in a vector, the first two elements define the -- first edge (the order is from , to for directed graphs). The vector -- should contain even number of integer numbers between zero and the -- number of vertices in the graph minus one (inclusive). If you also -- want to add new vertices, call igraph_add_vertices() first. igraphAddEdges :: (IGraph) -> (Vector) -> (Ptr ()) -> IO () igraphFull :: (Int) -> (Bool) -> (Bool) -> IO ((IGraph)) igraphErdosRenyiGame :: (ErdosRenyi) -> (Int) -> (Double) -> (Bool) -> (Bool) -> IO ((IGraph)) igraphDegreeSequenceGame :: (Vector) -> (Vector) -> (Degseq) -> IO ((IGraph)) igraphRewire :: (IGraph) -> (Int) -> (Rewiring) -> IO ((Int)) igraphIsoclassCreate :: (Int) -> (Int) -> (Bool) -> IO ((IGraph)) igraph_destroy :: FinalizerPtr IGraph igraphNew''_ :: ((Ptr (IGraph)) -> (CInt -> (CInt -> (IO CInt)))) igraphCopy'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraph)) -> (IO CInt))) igraphVcount'_ :: ((Ptr (IGraph)) -> (IO CInt)) igraphEcount'_ :: ((Ptr (IGraph)) -> (IO CInt)) igraphGetEid'_ :: ((Ptr (IGraph)) -> ((Ptr CInt) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO CInt))))))) igraphEdge'_ :: ((Ptr (IGraph)) -> (CInt -> ((Ptr CInt) -> ((Ptr CInt) -> (IO CInt))))) igraphAddVertices'_ :: ((Ptr (IGraph)) -> (CInt -> ((Ptr ()) -> (IO CInt)))) igraphAddEdge'_ :: ((Ptr (IGraph)) -> (CInt -> (CInt -> (IO CInt)))) igraphAddEdges'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr ()) -> (IO CInt)))) igraphFull'_ :: ((Ptr (IGraph)) -> (CInt -> (CInt -> (CInt -> (IO CInt))))) igraphErdosRenyiGame'_ :: ((Ptr (IGraph)) -> (CInt -> (CInt -> (CDouble -> (CInt -> (CInt -> (IO CInt))))))) igraphDegreeSequenceGame'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr (Vector)) -> (CInt -> (IO CInt))))) igraphRewire'_ :: ((Ptr (IGraph)) -> (CInt -> (CInt -> (IO CInt)))) igraphIsoclassCreate'_ :: ((Ptr (IGraph)) -> (CInt -> (CInt -> (CInt -> (IO CInt))))) module IGraph.Internal.Community igraphCommunitySpinglass :: (IGraph) -> (Vector) -> (Ptr CDouble) -> (Ptr CDouble) -> (Vector) -> (Ptr Vector) -> (Int) -> (Bool) -> (Double) -> (Double) -> (Double) -> (SpincommUpdate) -> (Double) -> (SpinglassImplementation) -> (Double) -> IO ((Int)) igraphCommunityLeadingEigenvector :: (IGraph) -> (Vector) -> (Ptr Matrix) -> (Vector) -> (Int) -> (ArpackOpt) -> (Ptr CDouble) -> (Bool) -> (Ptr Vector) -> (Ptr VectorPtr) -> (Ptr Vector) -> (T) -> (Ptr ()) -> IO ((Int)) type T = FunPtr (Ptr Vector -> CLong -> CDouble -> Ptr Vector -> FunPtr (Ptr CDouble -> Ptr CDouble -> CInt -> Ptr () -> IO CInt) -> Ptr () -> Ptr () -> IO CInt) igraphCommunitySpinglass'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr CDouble) -> ((Ptr CDouble) -> ((Ptr (Vector)) -> ((Ptr (Vector)) -> (CInt -> (CInt -> (CDouble -> (CDouble -> (CDouble -> (CInt -> (CDouble -> (CInt -> (CDouble -> (IO CInt)))))))))))))))) igraphCommunityLeadingEigenvector'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr (Matrix)) -> ((Ptr (Vector)) -> (CInt -> ((Ptr (ArpackOpt)) -> ((Ptr CDouble) -> (CInt -> ((Ptr (Vector)) -> ((Ptr (VectorPtr)) -> ((Ptr (Vector)) -> ((FunPtr ((Ptr (Vector)) -> (CLong -> (CDouble -> ((Ptr (Vector)) -> ((FunPtr ((Ptr CDouble) -> ((Ptr CDouble) -> (CInt -> ((Ptr ()) -> (IO CInt)))))) -> ((Ptr ()) -> ((Ptr ()) -> (IO CInt))))))))) -> ((Ptr ()) -> (IO CInt)))))))))))))) module IGraph.Internal.Clique igraphCliques :: (IGraph) -> (VectorPtr) -> (Int) -> (Int) -> IO ((Int)) igraphMaximalCliques :: (IGraph) -> (VectorPtr) -> (Int) -> (Int) -> IO ((Int)) igraphCliques'_ :: ((Ptr (IGraph)) -> ((Ptr (VectorPtr)) -> (CInt -> (CInt -> (IO CInt))))) igraphMaximalCliques'_ :: ((Ptr (IGraph)) -> ((Ptr (VectorPtr)) -> (CInt -> (CInt -> (IO CInt))))) module IGraph.Internal.Attribute asBS :: Serialize a => a -> (BSLen -> IO b) -> IO b asBSVector :: Serialize a => [a] -> (BSVector -> IO b) -> IO b fromBS :: Serialize a => Ptr BSLen -> IO a mkStrRec :: CString -> BSVector -> AttributeRecord data AttributeRecord AttributeRecord :: CString -> Int -> BSVector -> AttributeRecord igraphHaskellAttributeHasAttr :: (IGraph) -> (AttributeElemtype) -> (String) -> IO ((Bool)) igraphHaskellAttributeGANSet :: (IGraph) -> (String) -> (Double) -> IO ((Int)) igraphHaskellAttributeGAN :: (IGraph) -> (String) -> IO ((Double)) igraphHaskellAttributeVAS :: (IGraph) -> (String) -> (Int) -> IO ((Ptr BSLen)) igraphHaskellAttributeEAN :: (IGraph) -> (String) -> (Int) -> IO ((Double)) igraphHaskellAttributeEAS :: (IGraph) -> (String) -> (Int) -> IO ((Ptr BSLen)) igraphHaskellAttributeEASSetv :: (IGraph) -> (String) -> (BSVector) -> IO ((Int)) igraphHaskellAttributeVASSet :: (IGraph) -> (String) -> (Int) -> (Ptr BSLen) -> IO ((Int)) igraphHaskellAttributeEASSet :: (IGraph) -> (String) -> (Int) -> (Ptr BSLen) -> IO ((Int)) igraphHaskellAttributeHasAttr'_ :: ((Ptr (IGraph)) -> (CInt -> ((Ptr CChar) -> (IO CInt)))) igraphHaskellAttributeGANSet'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (CDouble -> (IO CInt)))) igraphHaskellAttributeGAN'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (IO CDouble))) igraphHaskellAttributeVAS'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (CInt -> (IO (Ptr ()))))) igraphHaskellAttributeEAN'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (CInt -> (IO CDouble)))) igraphHaskellAttributeEAS'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (CInt -> (IO (Ptr ()))))) igraphHaskellAttributeEASSetv'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> ((Ptr (BSVector)) -> (IO CInt)))) igraphHaskellAttributeVASSet'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (CInt -> ((Ptr ()) -> (IO CInt))))) igraphHaskellAttributeEASSet'_ :: ((Ptr (IGraph)) -> ((Ptr CChar) -> (CInt -> ((Ptr ()) -> (IO CInt))))) instance Foreign.Storable.Storable IGraph.Internal.Attribute.AttributeRecord module IGraph.Internal.Isomorphism igraphGetSubisomorphismsVf2 :: (IGraph) -> (IGraph) -> (Ptr ()) -> (Ptr ()) -> (Ptr ()) -> (Ptr ()) -> (VectorPtr) -> (FunPtr (Ptr IGraph -> Ptr IGraph -> CInt -> CInt -> Ptr () -> IO CInt)) -> (FunPtr (Ptr IGraph -> Ptr IGraph -> CInt -> CInt -> Ptr () -> IO CInt)) -> (Ptr ()) -> IO ((Int)) igraphIsomorphic :: (IGraph) -> (IGraph) -> (Ptr CInt) -> IO ((Int)) igraphGetSubisomorphismsVf2'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraph)) -> ((Ptr ()) -> ((Ptr ()) -> ((Ptr ()) -> ((Ptr ()) -> ((Ptr (VectorPtr)) -> ((FunPtr ((Ptr (IGraph)) -> ((Ptr (IGraph)) -> (CInt -> (CInt -> ((Ptr ()) -> (IO CInt))))))) -> ((FunPtr ((Ptr (IGraph)) -> ((Ptr (IGraph)) -> (CInt -> (CInt -> ((Ptr ()) -> (IO CInt))))))) -> ((Ptr ()) -> (IO CInt))))))))))) igraphIsomorphic'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraph)) -> ((Ptr CInt) -> (IO CInt)))) module IGraph.Internal.Layout igraphLayoutKamadaKawai :: (IGraph) -> (Matrix) -> (Int) -> (Double) -> (Double) -> (Double) -> (Double) -> (Bool) -> (Ptr Vector) -> (Ptr Vector) -> (Ptr Vector) -> (Ptr Vector) -> IO ((Int)) igraphLayoutLgl :: (IGraph) -> (Matrix) -> (Int) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> (Int) -> IO ((Int)) igraphLayoutKamadaKawai'_ :: ((Ptr (IGraph)) -> ((Ptr (Matrix)) -> (CInt -> (CDouble -> (CDouble -> (CDouble -> (CDouble -> (CInt -> ((Ptr (Vector)) -> ((Ptr (Vector)) -> ((Ptr (Vector)) -> ((Ptr (Vector)) -> (IO CInt))))))))))))) igraphLayoutLgl'_ :: ((Ptr (IGraph)) -> ((Ptr (Matrix)) -> (CInt -> (CDouble -> (CDouble -> (CDouble -> (CDouble -> (CDouble -> (CInt -> (IO CInt)))))))))) module IGraph.Internal.Selector newtype IGraphVs IGraphVs :: (ForeignPtr (IGraphVs)) -> IGraphVs withIGraphVs :: IGraphVs -> (Ptr IGraphVs -> IO b) -> IO b igraphVsAll :: IO ((IGraphVs)) igraphVsAdj :: (Int) -> (Neimode) -> IO ((IGraphVs)) igraphVsVector :: (Vector) -> IO ((IGraphVs)) newtype IGraphVit IGraphVit :: (ForeignPtr (IGraphVit)) -> IGraphVit withIGraphVit :: IGraphVit -> (Ptr IGraphVit -> IO b) -> IO b igraphVitNew :: (IGraph) -> (IGraphVs) -> IO ((IGraphVit)) igraphVitEnd :: (IGraphVit) -> IO ((Bool)) igraphVitNext :: (IGraphVit) -> IO () igraphVitGet :: (IGraphVit) -> IO ((Int)) vitToList :: IGraphVit -> IO [Int] newtype IGraphEs IGraphEs :: (ForeignPtr (IGraphEs)) -> IGraphEs withIGraphEs :: IGraphEs -> (Ptr IGraphEs -> IO b) -> IO b igraphEsAll :: (EdgeOrderType) -> IO ((IGraphEs)) igraphEsVector :: (Vector) -> IO ((IGraphEs)) newtype IGraphEit IGraphEit :: (ForeignPtr (IGraphEit)) -> IGraphEit withIGraphEit :: IGraphEit -> (Ptr IGraphEit -> IO b) -> IO b igraphEitNew :: (IGraph) -> (IGraphEs) -> IO ((IGraphEit)) igraphEitEnd :: (IGraphEit) -> IO ((Bool)) igraphEitNext :: (IGraphEit) -> IO () igraphEitGet :: (IGraphEit) -> IO ((Int)) eitToList :: IGraphEit -> IO [Int] igraphDeleteVertices :: (IGraph) -> (IGraphVs) -> IO ((Int)) igraphDeleteEdges :: (IGraph) -> (IGraphEs) -> IO ((Int)) igraph_vs_destroy :: FinalizerPtr IGraphVs igraphVsAll'_ :: ((Ptr (IGraphVs)) -> (IO CInt)) igraphVsAdj'_ :: ((Ptr (IGraphVs)) -> (CInt -> (CInt -> (IO CInt)))) igraphVsVector'_ :: ((Ptr (IGraphVs)) -> ((Ptr (Vector)) -> (IO CInt))) igraph_vit_destroy :: FinalizerPtr IGraphVit igraphVitNew'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraphVs)) -> ((Ptr (IGraphVit)) -> (IO CInt)))) igraphVitEnd'_ :: ((Ptr (IGraphVit)) -> (IO CInt)) igraphVitNext'_ :: ((Ptr (IGraphVit)) -> (IO ())) igraphVitGet'_ :: ((Ptr (IGraphVit)) -> (IO CInt)) igraph_es_destroy :: FinalizerPtr IGraphEs igraphEsAll'_ :: ((Ptr (IGraphEs)) -> (CInt -> (IO CInt))) igraphEsVector'_ :: ((Ptr (IGraphEs)) -> ((Ptr (Vector)) -> (IO CInt))) igraph_eit_destroy :: FinalizerPtr IGraphEit igraphEitNew'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraphEs)) -> ((Ptr (IGraphEit)) -> (IO CInt)))) igraphEitEnd'_ :: ((Ptr (IGraphEit)) -> (IO CInt)) igraphEitNext'_ :: ((Ptr (IGraphEit)) -> (IO ())) igraphEitGet'_ :: ((Ptr (IGraphEit)) -> (IO CInt)) igraphDeleteVertices'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraphVs)) -> (IO CInt))) igraphDeleteEdges'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraphEs)) -> (IO CInt))) module IGraph.Internal.Motif igraphTriadCensus :: (IGraph) -> (Vector) -> IO ((Int)) igraphMotifsRandesu :: (IGraph) -> (Vector) -> (Int) -> (Vector) -> IO ((Int)) igraphTriadCensus'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> (IO CInt))) igraphMotifsRandesu'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> (CInt -> ((Ptr (Vector)) -> (IO CInt))))) module IGraph.Internal.Structure igraphInducedSubgraph :: (IGraph) -> (IGraphVs) -> (SubgraphImplementation) -> IO ((IGraph)) igraphCloseness :: (IGraph) -> (Vector) -> (IGraphVs) -> (Neimode) -> (Vector) -> (Bool) -> IO ((Int)) igraphBetweenness :: (IGraph) -> (Vector) -> (IGraphVs) -> (Bool) -> (Vector) -> (Bool) -> IO ((Int)) igraphEigenvectorCentrality :: (IGraph) -> (Vector) -> (Ptr CDouble) -> (Bool) -> (Bool) -> (Vector) -> (ArpackOpt) -> IO ((Int)) igraphPagerank :: (IGraph) -> (PagerankAlgo) -> (Vector) -> (Ptr CDouble) -> (IGraphVs) -> (Bool) -> (Double) -> (Vector) -> (Ptr ()) -> IO ((Int)) igraphPersonalizedPagerank :: (IGraph) -> (PagerankAlgo) -> (Vector) -> (Ptr CDouble) -> (IGraphVs) -> (Bool) -> (Double) -> (Vector) -> (Vector) -> (Ptr ()) -> IO ((Int)) igraphInducedSubgraph'_ :: ((Ptr (IGraph)) -> ((Ptr (IGraph)) -> ((Ptr (IGraphVs)) -> (CInt -> (IO CInt))))) igraphCloseness'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr (IGraphVs)) -> (CInt -> ((Ptr (Vector)) -> (CInt -> (IO CInt))))))) igraphBetweenness'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr (IGraphVs)) -> (CInt -> ((Ptr (Vector)) -> (CInt -> (IO CInt))))))) igraphEigenvectorCentrality'_ :: ((Ptr (IGraph)) -> ((Ptr (Vector)) -> ((Ptr CDouble) -> (CInt -> (CInt -> ((Ptr (Vector)) -> ((Ptr (ArpackOpt)) -> (IO CInt)))))))) igraphPagerank'_ :: ((Ptr (IGraph)) -> (CInt -> ((Ptr (Vector)) -> ((Ptr CDouble) -> ((Ptr (IGraphVs)) -> (CInt -> (CDouble -> ((Ptr (Vector)) -> ((Ptr ()) -> (IO CInt)))))))))) igraphPersonalizedPagerank'_ :: ((Ptr (IGraph)) -> (CInt -> ((Ptr (Vector)) -> ((Ptr CDouble) -> ((Ptr (IGraphVs)) -> (CInt -> (CDouble -> ((Ptr (Vector)) -> ((Ptr (Vector)) -> ((Ptr ()) -> (IO CInt))))))))))) module IGraph.Types type Node = Int type Edge = (Node, Node) type LEdge a = (Edge, a) -- | Undirected graph. data U -- | Directed graph. data D module IGraph.Mutable class MGraph d -- | Create a new graph. new :: (MGraph d, PrimMonad m) => Int -> m (MLGraph (PrimState m) d v e) -- | Add nodes to the graph. addNodes :: (MGraph d, PrimMonad m) => Int -> MLGraph (PrimState m) d v e -> m () -- | Add nodes with labels to the graph. addLNodes :: (MGraph d, Serialize v, PrimMonad m) => [v] -> MLGraph (PrimState m) d v e -> m () -- | Delete nodes from the graph. delNodes :: (MGraph d, PrimMonad m) => [Int] -> MLGraph (PrimState m) d v e -> m () -- | Add edges to the graph. addEdges :: (MGraph d, PrimMonad m) => [(Int, Int)] -> MLGraph (PrimState m) d v e -> m () -- | Add edges with labels to the graph. addLEdges :: (MGraph d, PrimMonad m, Serialize e) => [LEdge e] -> MLGraph (PrimState m) d v e -> m () -- | Delete edges from the graph. delEdges :: (MGraph d, PrimMonad m) => [(Int, Int)] -> MLGraph (PrimState m) d v e -> m () -- | Mutable labeled graph. newtype MLGraph m d v e MLGraph :: IGraph -> MLGraph m d v e -- | Set edge attribute. setEdgeAttr :: (PrimMonad m, Serialize e) => Int -> e -> MLGraph (PrimState m) d v e -> m () -- | Set node attribute. setNodeAttr :: (PrimMonad m, Serialize v) => Int -> v -> MLGraph (PrimState m) d v e -> m () edgeAttr :: String vertexAttr :: String withVertexAttr :: (CString -> IO a) -> IO a withEdgeAttr :: (CString -> IO a) -> IO a instance IGraph.Mutable.MGraph IGraph.Types.U instance IGraph.Mutable.MGraph IGraph.Types.D module IGraph class MGraph d => Graph d -- | Graph is directed or not. isDirected :: Graph d => LGraph d v e -> Bool isD :: Graph d => d -> Bool -- | Return the number of nodes in a graph. nNodes :: Graph d => LGraph d v e -> Int -- | Return all nodes. nodes gr == [0 .. nNodes gr - 1]. nodes :: Graph d => LGraph d v e -> [Node] -- | Return the number of edges in a graph. nEdges :: Graph d => LGraph d v e -> Int -- | Return all edges. edges :: Graph d => LGraph d v e -> [Edge] -- | Whether a edge exists in the graph. hasEdge :: Graph d => LGraph d v e -> Edge -> Bool -- | Return the label of given node. nodeLab :: (Graph d, Serialize v) => LGraph d v e -> Node -> v -- | Return all nodes that are associated with given label. getNodes :: (Graph d, Hashable v, Eq v) => LGraph d v e -> v -> [Node] -- | Return the label of given edge. edgeLab :: (Graph d, Serialize e) => LGraph d v e -> Edge -> e -- | Find the edge by edge ID. getEdgeByEid :: Graph d => LGraph d v e -> Int -> Edge -- | Find the edge label by edge ID. edgeLabByEid :: (Graph d, Serialize e) => LGraph d v e -> Int -> e -- | Graph with labeled nodes and edges. data LGraph d v e LGraph :: IGraph -> HashMap v [Node] -> LGraph d v e [_graph] :: LGraph d v e -> IGraph [_labelToNode] :: LGraph d v e -> HashMap v [Node] -- | Undirected graph. data U -- | Directed graph. data D -- | Decode a graph from a stream of inputs. This may be more memory -- efficient than standard decode function. decodeC :: (PrimMonad m, MonadThrow m, Graph d, Serialize v, Serialize e, Hashable v, Eq v) => ConduitT ByteString o m (LGraph d v e) -- | Create a empty graph. empty :: (Graph d, Hashable v, Serialize v, Eq v, Serialize e) => LGraph d v e -- | Create a graph. mkGraph :: (Graph d, Hashable v, Serialize v, Eq v, Serialize e) => [v] -> [LEdge e] -> LGraph d v e -- | Create a graph from labeled edges. fromLabeledEdges :: (Graph d, Hashable v, Serialize v, Eq v, Serialize e) => [((v, v), e)] -> LGraph d v e -- | Create a graph from a stream of labeled edges. fromLabeledEdges' :: (PrimMonad m, Graph d, Hashable v, Serialize v, Eq v, Serialize e) => a -> (a -> ConduitT () ((v, v), e) m ()) -> m (LGraph d v e) -- | Convert a mutable graph to immutable graph. The original graph may not -- be used afterwards. unsafeFreeze :: (Hashable v, Eq v, Serialize v, PrimMonad m) => MLGraph (PrimState m) d v e -> m (LGraph d v e) -- | Convert a mutable graph to immutable graph. freeze :: (Hashable v, Eq v, Serialize v, PrimMonad m) => MLGraph (PrimState m) d v e -> m (LGraph d v e) -- | Create a mutable graph. The original graph may not be used afterwards. unsafeThaw :: PrimMonad m => LGraph d v e -> m (MLGraph (PrimState m) d v e) -- | Create a mutable graph. thaw :: (PrimMonad m, Graph d) => LGraph d v e -> m (MLGraph (PrimState m) d v e) -- | Find all neighbors of the given node. neighbors :: LGraph d v e -> Node -> [Node] -- | Find all nodes that link to to the given node. pre :: LGraph D v e -> Node -> [Node] -- | Find all nodes that have a link from the given node. suc :: LGraph D v e -> Node -> [Node] -- | Apply a function to change nodes' labels. mapNodes :: (Graph d, Serialize v1, Serialize v2, Hashable v2, Eq v2) => (Node -> v1 -> v2) -> LGraph d v1 e -> LGraph d v2 e -- | Apply a function to change edges' labels. mapEdges :: (Graph d, Serialize e1, Serialize e2, Hashable v, Eq v, Serialize v) => (Edge -> e1 -> e2) -> LGraph d v e1 -> LGraph d v e2 -- | Keep nodes that satisfy the constraint filterNodes :: (Hashable v, Eq v, Serialize v, Graph d) => (LGraph d v e -> Node -> Bool) -> LGraph d v e -> LGraph d v e -- | Keep nodes that satisfy the constraint. filterEdges :: (Hashable v, Eq v, Serialize v, Graph d) => (LGraph d v e -> Edge -> Bool) -> LGraph d v e -> LGraph d v e -- | Map a function over the node labels in a graph. nmap :: (Graph d, Serialize v, Hashable u, Serialize u, Eq u) => ((Node, v) -> u) -> LGraph d v e -> LGraph d u e -- | Map a function over the edge labels in a graph. emap :: (Graph d, Serialize v, Hashable v, Eq v, Serialize e1, Serialize e2) => ((Edge, e1) -> e2) -> LGraph d v e1 -> LGraph d v e2 instance IGraph.Graph IGraph.Types.U instance IGraph.Graph IGraph.Types.D instance (IGraph.Graph d, Data.Serialize.Serialize v, Data.Serialize.Serialize e, Data.Hashable.Class.Hashable v, GHC.Classes.Eq v) => Data.Serialize.Serialize (IGraph.LGraph d v e) module IGraph.Structure inducedSubgraph :: (Hashable v, Eq v, Serialize v) => LGraph d v e -> [Int] -> LGraph d v e -- | Closeness centrality closeness :: [Int] -> LGraph d v e -> Maybe [Double] -> Neimode -> Bool -> [Double] -- | Betweenness centrality betweenness :: [Int] -> LGraph d v e -> Maybe [Double] -> [Double] -- | Eigenvector centrality eigenvectorCentrality :: LGraph d v e -> Maybe [Double] -> [Double] -- | Google's PageRank pagerank :: Graph d => LGraph d v e -> Maybe [Double] -> Double -> [Double] -- | Personalized PageRank. personalizedPagerank :: Graph d => LGraph d v e -> [Double] -> Maybe [Double] -> Double -> [Double] module IGraph.Read readAdjMatrix :: Graph d => FilePath -> IO (LGraph d ByteString ()) fromAdjMatrix :: Graph d => ByteString -> LGraph d ByteString () readAdjMatrixWeighted :: Graph d => FilePath -> IO (LGraph d ByteString Double) module IGraph.Motif -- | Every triple of vertices in a directed graph 003: A, B, C, the empty -- graph. 012: A->B, C, a graph with a single directed edge. 102: -- A-B, C, a graph with a mutual connection between two vertices. -- 021D: A-B-C, the binary out-tree. 021U: A->B<-C, the -- binary in-tree. 021C: A->B->C, the directed line. 111D: -- A-B<-C. 111U: A-B->C. 030T: A->BA-C. -- Feed forward loop. 030C: AA-C. 201: A-B-C. 120D: -- A-B-C, A-C. 120U: A->BA<-C. 120C: -- A->B->C, A-C. 210: A->B-C, A-C. 300: -- A-B-C, A-C, the complete graph. triad :: [LGraph D () ()] triadCensus :: (Hashable v, Eq v, Read v) => LGraph d v e -> [Int] module IGraph.Layout getLayout :: Graph d => LGraph d v e -> LayoutMethod -> IO [(Double, Double)] data LayoutMethod KamadaKawai :: !(Maybe [(Double, Double)]) -> !Int -> (Int -> Double) -> !Double -> !Double -> (Int -> Double) -> LayoutMethod [kk_seed] :: LayoutMethod -> !(Maybe [(Double, Double)]) [kk_nIter] :: LayoutMethod -> !Int -- | The base standard deviation of position change proposals [kk_sigma] :: LayoutMethod -> (Int -> Double) -- | The initial temperature for the annealing [kk_startTemp] :: LayoutMethod -> !Double -- | The cooling factor for the simulated annealing [kk_coolFact] :: LayoutMethod -> !Double -- | The Kamada-Kawai vertex attraction constant [kk_const] :: LayoutMethod -> (Int -> Double) LGL :: !Int -> (Int -> Double) -> (Int -> Double) -> !Double -> (Int -> Double) -> (Int -> Double) -> LayoutMethod [lgl_nIter] :: LayoutMethod -> !Int -- | The maximum length of the move allowed for a vertex in a single -- iteration. A reasonable default is the number of vertices. [lgl_maxdelta] :: LayoutMethod -> (Int -> Double) -- | This parameter gives the area of the square on which the vertices will -- be placed. A reasonable default value is the number of vertices -- squared. [lgl_area] :: LayoutMethod -> (Int -> Double) -- | The cooling exponent. A reasonable default value is 1.5. [lgl_coolexp] :: LayoutMethod -> !Double -- | Determines the radius at which vertex-vertex repulsion cancels out -- attraction of adjacent vertices. A reasonable default value is area -- times the number of vertices. [lgl_repulserad] :: LayoutMethod -> (Int -> Double) [lgl_cellsize] :: LayoutMethod -> (Int -> Double) defaultKamadaKawai :: LayoutMethod defaultLGL :: LayoutMethod module IGraph.Isomorphism getSubisomorphisms :: Graph d => LGraph d v1 e1 -> LGraph d v2 e2 -> [[Int]] -- | Determine whether two graphs are isomorphic. isomorphic :: Graph d => LGraph d v1 e1 -> LGraph d v2 e2 -> Bool -- | Creates a graph from the given isomorphism class. This function is -- implemented only for graphs with three or four vertices. isoclassCreate :: Graph d => Int -> Int -> d -> LGraph d () () isoclass3 :: Graph d => d -> [LGraph d () ()] isoclass4 :: Graph d => d -> [LGraph d () ()] module IGraph.Generators data ErdosRenyiModel GNP :: Int -> Double -> ErdosRenyiModel GNM :: Int -> Int -> ErdosRenyiModel erdosRenyiGame :: Graph d => ErdosRenyiModel -> d -> Bool -> IO (LGraph d () ()) -- | Generates a random graph with a given degree sequence. degreeSequenceGame :: [Int] -> [Int] -> IO (LGraph D () ()) -- | Randomly rewires a graph while preserving the degree distribution. rewire :: (Graph d, Hashable v, Serialize v, Eq v, Serialize e) => Int -> LGraph d v e -> IO (LGraph d v e) module IGraph.Exporter.GEXF data NodeAttr NodeAttr :: Double -> AlphaColour Double -> String -> Double -> Double -> Int -> NodeAttr [_size] :: NodeAttr -> Double [_nodeColour] :: NodeAttr -> AlphaColour Double [_nodeLabel] :: NodeAttr -> String [_positionX] :: NodeAttr -> Double [_positionY] :: NodeAttr -> Double [_nodeZindex] :: NodeAttr -> Int defaultNodeAttributes :: NodeAttr data EdgeAttr EdgeAttr :: String -> AlphaColour Double -> Double -> Double -> Int -> EdgeAttr [_edgeLabel] :: EdgeAttr -> String [_edgeColour] :: EdgeAttr -> AlphaColour Double [_edgeWeight] :: EdgeAttr -> Double [_edgeArrowLength] :: EdgeAttr -> Double [_edgeZindex] :: EdgeAttr -> Int defaultEdgeAttributes :: EdgeAttr genXMLTree :: (ArrowXml a, Graph d) => LGraph d NodeAttr EdgeAttr -> a XmlTree XmlTree writeGEXF :: Graph d => FilePath -> LGraph d NodeAttr EdgeAttr -> IO () instance GHC.Generics.Generic IGraph.Exporter.GEXF.EdgeAttr instance GHC.Classes.Eq IGraph.Exporter.GEXF.EdgeAttr instance GHC.Read.Read IGraph.Exporter.GEXF.EdgeAttr instance GHC.Show.Show IGraph.Exporter.GEXF.EdgeAttr instance GHC.Generics.Generic IGraph.Exporter.GEXF.NodeAttr instance GHC.Classes.Eq IGraph.Exporter.GEXF.NodeAttr instance GHC.Read.Read IGraph.Exporter.GEXF.NodeAttr instance GHC.Show.Show IGraph.Exporter.GEXF.NodeAttr instance Data.Serialize.Serialize IGraph.Exporter.GEXF.EdgeAttr instance Data.Hashable.Class.Hashable IGraph.Exporter.GEXF.EdgeAttr instance Data.Serialize.Serialize IGraph.Exporter.GEXF.NodeAttr instance Data.Hashable.Class.Hashable IGraph.Exporter.GEXF.NodeAttr instance Data.Serialize.Serialize (Data.Colour.Internal.AlphaColour GHC.Types.Double) module IGraph.Community data CommunityOpt CommunityOpt :: CommunityMethod -> Maybe [Double] -> Int -> Int -> Double -> Double -> Double -> Double -> CommunityOpt [_method] :: CommunityOpt -> CommunityMethod [_weights] :: CommunityOpt -> Maybe [Double] -- | [_nIter] :: CommunityOpt -> Int -- | [_nSpins] :: CommunityOpt -> Int -- | [_startTemp] :: CommunityOpt -> Double -- | [_stopTemp] :: CommunityOpt -> Double -- | [_coolFact] :: CommunityOpt -> Double -- | [_gamma] :: CommunityOpt -> Double data CommunityMethod LeadingEigenvector :: CommunityMethod Spinglass :: CommunityMethod findCommunity :: LGraph U v e -> CommunityOpt -> [[Int]] instance Data.Default.Class.Default IGraph.Community.CommunityOpt module IGraph.Clique cliques :: LGraph d v e -> (Int, Int) -> [[Int]] maximalCliques :: LGraph d v e -> (Int, Int) -> [[Int]]