Copyright | (c) Ivan Lazar Miljenovic |
---|---|
License | MIT |
Maintainer | Ivan.Miljenovic@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
- data Graph et n nl el = Gr {}
- type NodeMap n nl = HashMap n (Adj, nl)
- type EdgeMap et n el = HashMap Edge (et n, el)
- newtype Edge = Edge {}
- type Set n = HashMap n ()
- mkSet :: (Eq n, Hashable n) => [n] -> Set n
- type Adj = HashMap Edge Int
- adjCount :: Eq n => n -> n -> Int
- type ValidGraph et n = (Hashable n, Eq n, EdgeType et)
- mkGraph :: ValidGraph et n => [(n, nl)] -> [(n, n, el)] -> Graph et n nl el
- class (Functor et, NodeFrom (AdjType et)) => EdgeType et where
- class NodeFrom at where
- getNode :: at n -> n
- nodeDetails :: Graph et n nl el -> [(n, ([Edge], nl))]
- lnodes :: Graph et n nl el -> [(n, nl)]
- edges :: Graph et n nl el -> [Edge]
- edgeDetails :: Graph et n nl el -> [(Edge, (et n, el))]
- ledges :: Graph et n nl el -> [(Edge, el)]
- edgePairs :: EdgeType et => Graph et n nl el -> [(n, n)]
- ledgePairs :: EdgeType et => Graph et n nl el -> [(n, n, el)]
- degNM :: (Eq n, Hashable n) => NodeMap n nl -> n -> Int
- withNodeMap :: (NodeMap n nl -> NodeMap n nl') -> Graph et n nl el -> Graph et n nl' el
- withEdgeMap :: (EdgeMap et n el -> EdgeMap et n el') -> Graph et n nl el -> Graph et n nl el'
Documentation
Bounded Edge Source | |
Enum Edge Source | |
Eq Edge Source | |
Ord Edge Source | |
Read Edge Source | |
Show Edge Source | |
NFData Edge Source | |
Hashable Edge Source | |
ToContext (n, nl, AdjLookup (at n) el) Source | |
FromContext (n, nl, AdjLookup (at n) el) Source | |
Contextual (n, nl, AdjLookup (at n) el) Source | |
type CNode (n, nl, AdjLookup (at n) el) = n Source | |
type CAType (n, nl, AdjLookup (at n) el) = at Source | |
type CNLabel (n, nl, AdjLookup (at n) el) = nl Source | |
type CELabel (n, nl, AdjLookup (at n) el) = el Source |
type ValidGraph et n = (Hashable n, Eq n, EdgeType et) Source
mkGraph :: ValidGraph et n => [(n, nl)] -> [(n, n, el)] -> Graph et n nl el Source
Assumes all nodes are in the node list.
class (Functor et, NodeFrom (AdjType et)) => EdgeType et where Source
nodeDetails :: Graph et n nl el -> [(n, ([Edge], nl))] Source
edgeDetails :: Graph et n nl el -> [(Edge, (et n, el))] Source
ledgePairs :: EdgeType et => Graph et n nl el -> [(n, n, el)] Source