| Copyright | (c) Andrey Mokhov 2016-2018 |
|---|---|
| License | MIT (see the file LICENSE) |
| Maintainer | andrey.mokhov@gmail.com |
| Stability | unstable |
| Safe Haskell | None |
| Language | Haskell2010 |
Algebra.Graph.Labelled.AdjacencyMap.Internal
Description
This module exposes the implementation of edge-labelled adjacency maps. The API is unstable and unsafe, and is exposed only for documentation. You should use the non-internal module Algebra.Graph.Labelled.AdjdacencyMap instead.
Synopsis
- newtype AdjacencyMap e a = AM {
- adjacencyMap :: Map a (Map a e)
- consistent :: (Ord a, Eq e, Monoid e) => AdjacencyMap e a -> Bool
Labelled adjacency map implementation
newtype AdjacencyMap e a Source #
Edge-labelled graphs, where the type variable e stands for edge labels.
For example, AdjacencyMap Bool a is isomorphic to unlabelled graphs
defined in the top-level module Algebra.Graph.AdjacencyMap, where False
and True denote the lack of and the existence of an unlabelled edge,
respectively.
Constructors
| AM | |
Fields
| |
Instances
consistent :: (Ord a, Eq e, Monoid e) => AdjacencyMap e a -> Bool Source #
Check if the internal graph representation is consistent, i.e. that all
edges refer to existing vertices, and there are no zero-labelled edges. It
should be impossible to create an inconsistent adjacency map, and we use this
function in testing.
Note: this function is for internal use only.