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 a w. Ord a => AdjacencyList a w -> Graph a w`

Create a graph from an adjacency list.

### #isAdjacent Source

`isAdjacent :: forall a w. Ord a => a -> a -> Graph a w -> Boolean`

Test whether two vertices are adjacent in a graph.

### #connectedComponents Source

`connectedComponents :: forall a w. 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 a w. Ord a => a -> Graph a w -> Graph a w`

Insert a vertex into a graph.

### #insertEdge Source

`insertEdge :: forall a w. Ord a => a -> a -> w -> Graph a w -> Graph a w`

Insert an edge into a graph.

### #deleteVertex Source

`deleteVertex :: forall a w. Ord a => a -> Graph a w -> Graph a w`

Delete a vertex from a graph.

- Modules
- Data.
Graph