Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

For Connectivity analysis purposes a `DGraph`

can be converted into a
| `UGraph`

using `toUndirected`

- areConnected :: forall g v e. (Graph g, Hashable v, Eq v, Ord v) => g v e -> v -> v -> Bool
- areDisconnected :: (Graph g, Hashable v, Eq v, Ord v) => g v e -> v -> v -> Bool
- isIsolated :: (Graph g, Hashable v, Eq v) => g v e -> v -> Bool
- isConnected :: (Graph g, Hashable v, Eq v, Ord v) => g v e -> Bool
- isBridgeless :: (Hashable v, Eq v, Ord v) => UGraph v e -> Bool
- isOrientable :: (Hashable v, Eq v, Ord v) => UGraph v e -> Bool
- isWeaklyConnected :: (Hashable v, Eq v, Ord v) => DGraph v e -> Bool
- isStronglyConnected :: (Hashable v, Eq v, Ord v) => DGraph v e -> Bool

# Documentation

areConnected :: forall g v e. (Graph g, Hashable v, Eq v, Ord v) => g v e -> v -> v -> Bool Source #

Tell if two vertices of a graph are connected

Two vertices are `connected`

if it exists a path between them. The order of
the vertices is relevant when the graph is directed

areDisconnected :: (Graph g, Hashable v, Eq v, Ord v) => g v e -> v -> v -> Bool Source #

Opposite of `areConnected`

isIsolated :: (Graph g, Hashable v, Eq v) => g v e -> v -> Bool Source #

Tell if a vertex is isolated

A vertex is `isolated`

if it has no incident edges, that is, it has a degree
of zero

isConnected :: (Graph g, Hashable v, Eq v, Ord v) => g v e -> Bool Source #

Tell if a graph is connected

An undirected graph is `connected`

when there is a path between every pair
of vertices
FIXME: Use a O(n) algorithm

isBridgeless :: (Hashable v, Eq v, Ord v) => UGraph v e -> Bool Source #

Tell if a graph is bridgeless

A graph is `bridgeless`

if it has no edges that, when removed, split the
graph in two isolated components
FIXME: Use a O(n) algorithm

isOrientable :: (Hashable v, Eq v, Ord v) => UGraph v e -> Bool Source #

Tell if a `UGraph`

is orientable

An undirected graph is `orientable`

if it can be converted into a directed
graph that is `strongly connected`

(See `isStronglyConnected`

)