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

Language | Haskell2010 |

- data UGraph v e
- insertEdge :: (Hashable v, Eq v) => Edge v e -> UGraph v e -> UGraph v e
- insertEdges :: (Hashable v, Eq v) => [Edge v e] -> UGraph v e -> UGraph v e
- removeEdge :: (Hashable v, Eq v) => Edge v e -> UGraph v e -> UGraph v e
- removeEdges :: (Hashable v, Eq v) => [Edge v e] -> UGraph v e -> UGraph v e
- removeEdgeAndVertices :: (Hashable v, Eq v) => Edge v e -> UGraph v e -> UGraph v e
- edges :: forall v e. (Hashable v, Eq v) => UGraph v e -> [Edge v e]
- containsEdge :: (Hashable v, Eq v) => UGraph v e -> Edge v e -> Bool
- incidentEdges :: (Hashable v, Eq v) => UGraph v e -> v -> [Edge v e]
- toEdgesList :: (Hashable v, Eq v) => UGraph v e -> [Edge v e]
- fromEdgesList :: (Hashable v, Eq v) => [Edge v e] -> UGraph v e
- prettyPrint :: (Hashable v, Eq v, Show v, Show e) => UGraph v e -> String

# UGraph data type

Undirected Graph of Vertices in *v* and Edges with attributes in *e*

Graph UGraph Source # | |

(Hashable v, Eq v) => Functor (UGraph v) Source # | |

(Hashable v, Eq v) => Foldable (UGraph v) Source # | |

(Eq e, Eq v) => Eq (UGraph v e) Source # | |

(Hashable v, Eq v, Read v, Read e) => Read (UGraph v e) Source # | |

(Hashable v, Eq v, Show v, Show e) => Show (UGraph v e) Source # | |

Generic (UGraph v e) Source # | |

(Hashable v, Eq v) => Semigroup (UGraph v e) Source # | |

(Hashable v, Eq v) => Monoid (UGraph v e) Source # | |

(Arbitrary v, Arbitrary e, Hashable v, Num v, Ord v) => Arbitrary (UGraph v e) Source # | |

(NFData v, NFData e) => NFData (UGraph v e) Source # | |

type Rep (UGraph v e) Source # | |

# Functions on UGraph

insertEdges :: (Hashable v, Eq v) => [Edge v e] -> UGraph v e -> UGraph v e Source #

Same as `insertEdge`

but for a list of `Edge`

s

removeEdges :: (Hashable v, Eq v) => [Edge v e] -> UGraph v e -> UGraph v e Source #

Same as `removeEdge`

but for a list of `Edge`

s

containsEdge :: (Hashable v, Eq v) => UGraph v e -> Edge v e -> Bool Source #

Tell if an undirected `Edge`

exists in the graph

incidentEdges :: (Hashable v, Eq v) => UGraph v e -> v -> [Edge v e] Source #

Retrieve the incident `Edge`

s of a Vertex

# List conversions

toEdgesList :: (Hashable v, Eq v) => UGraph v e -> [Edge v e] Source #

Convert a `UGraph`

to a list of `Edge`

s discarding isolated vertices

Note that because `toEdgesList`

discards isolated vertices:
> fromEdgesList . toEdgesList /= id