Module
Data.Graph
- Package
- purescript-digraph
- Repository
- nullobject/purescript-digraph
#AdjacencyList Source
type AdjacencyList a w = List (Tuple a (List (Tuple a w)))AdjacencyList a w represents a List of vertices of type a with a
list of adjacent vertices connected with edges of type w.
#fromAdjacencyList Source
fromAdjacencyList :: forall w a. Ord a => AdjacencyList a w -> Graph a wCreate a graph from an adjacency list.
#isAdjacent Source
isAdjacent :: forall w a. Ord a => a -> a -> Graph a w -> BooleanTest whether two vertices are adjacent in a graph.
#connectedComponents Source
connectedComponents :: forall w a. Ord a => Graph a w -> List (Graph a w)Get the strongly connected components of a graph. Returns a List of
connected subgraphs.
#insertVertex Source
insertVertex :: forall w a. Ord a => a -> Graph a w -> Graph a wInsert a vertex into a graph.
#insertEdge Source
insertEdge :: forall w a. Ord a => a -> a -> w -> Graph a w -> Graph a wInsert an edge into a graph.
#deleteVertex Source
deleteVertex :: forall w a. Ord a => a -> Graph a w -> Graph a wDelete a vertex from a graph.
- Modules
- Data.
Graph