Idris2Doc : Data.Graph.Indexed.Util

Data.Graph.Indexed.Util

(source)

Definitions

allFinsFast : (n : Nat) ->List (Finn)
  Generates the list of all `Fin n` in linear type.

This is a lot faster than `Data.Fin.allFins`, which runs in quadratic
time.

Totality: total
Visibility: export
lupdNodes : MArraysk (Adjken) -> (n->n) ->F1's
  Updates all node labels in a mutable graph.

Totality: total
Visibility: export
lupdNode : MArraysk (Adjken) ->Fink-> (n->n) ->F1's
  Updates the node label at the given position in a mutable graph.

Totality: total
Visibility: export
lsetNode : MArraysk (Adjken) ->Fink->n->F1's
  Sets the node label at the given position in a mutable graph.

Totality: total
Visibility: export
linsEdge : MArraysk (Adjken) ->Edgeke->F1's
  Insert a single edge into a mutable array-representation of a graph.

Totality: total
Visibility: export
ldelEdge : MArraysk (Adjken) ->Fink->Fink->F1's
  Delete a single edge from a mutable array-representation of a graph.

Totality: total
Visibility: export
linsEdges : MArraysk (Adjken) ->List (Edgeke) ->F1's
  Insert a bunch of edges into a mutable array-representation of a graph.

Totality: total
Visibility: export
ldelEdges : MArraysk (Adjken) ->List (Fink, Fink) ->F1's
  Insert a bunch of edges into a mutable array-representation of a graph.

Totality: total
Visibility: export
contexts : IGraphken->List (Contextken)
  A list of contexts of a graph

Totality: total
Visibility: export
nodes : (0_ : IGraphken) ->List (Fink)
  List all 'Node's in the 'Graph'.

Totality: total
Visibility: export
labNodes : IGraphken->List (Fink, n)
  A list of all labeled nodes of a `Graph`

Totality: total
Visibility: export
labels : IGraphken->Listn
  A list of all labeled nodes of a `Graph`

Totality: total
Visibility: export
adj : IGraphken->Fink->Adjken
  Returns the adjacency (node label plus labeled edges to neighbours)
of a node in a graph.

Totality: total
Visibility: export
lab : IGraphken->Fink->n
  Returns the label of a node in graph.

Totality: total
Visibility: export
neighboursAsAL : IGraphken->Fink->AssocListke
  Returns the edges connecting a node as an `AssocList`
(nodes plus edge labels).

Totality: total
Visibility: export
neighboursAsPairs : IGraphken->Fink->List (Fink, e)
  Returns the edges connecting a node as a list of pairs
(nodes plus edge labels).

Totality: total
Visibility: export
neighbours : IGraphken->Fink->List (Fink)
  Returns the list of neighbouring nodes of a node in a graph.

Totality: total
Visibility: export
edgesTo : IGraphken->Fink->List (Edgeke)
  Returns the list of edges connecting a node.

Totality: total
Visibility: export
lneighbours : IGraphken->Fink->List (Fink, n)
  Returns the list of neighboring nodes paired with their
corresponding labels.

Totality: total
Visibility: export
lneighboursAsAL : IGraphken->Fink->AssocListk (e, n)
  Returns the edges connecting a node paired with the
neighbouring node labels.

Totality: total
Visibility: export
neighbourLabels : IGraphken->Fink->Listn
  Returns the labels of neighbour nodes of a node.

Totality: total
Visibility: export
edgeLabels : IGraphken->Fink->Liste
  Returns the labels of edges connecting a node.

Totality: total
Visibility: export
elab : IGraphken->Fink->Fink->Maybee
  Find the label for an `Edge`.

Totality: total
Visibility: export
edge : IGraphken->Fink->Fink->Maybe (Edgeke)
  Find the label for an `Edge`.

Totality: total
Visibility: export
adjacent : IGraphken->Fink->Fink->Bool
  Tests if the given nodes are adjecent (connected via an edge).

Totality: total
Visibility: export
edges : IGraphken->List (Edgeke)
  A list of all `LEdge`s in the `Graph` (in lexicographic order).

Totality: total
Visibility: export
size : IGraphken->Nat
  The number of edges in the graph.

Totality: total
Visibility: export
deg : IGraphken->Fink->Nat
  The degree of the `Node`.

Totality: total
Visibility: export
hasNeighbour : IGraphken->Fink->Fink->Bool
  Checks if there is an undirected edge between two nodes.

Totality: total
Visibility: export
empty : IGraph0en
  An empty `Graph`

Totality: total
Visibility: export
mkGraphL : (ns : Listn) ->List (Edge (lengthns) e) ->IGraph (lengthns) en
  Create a `Graph` from a list of labeled nodes and edges.

Totality: total
Visibility: export
mkGraph : Vectkn->List (Edgeke) ->IGraphken
  Create a `Graph` from a vect of labeled nodes and edges.

Totality: total
Visibility: export
mkGraphRev : Vectkn->List (Edgeke) ->IGraphken
  Create a `Graph` from a vect of labeled nodes and edges.

Unlike `mkGraph`, this puts the nodes in the array in reverse order,
which is useful when they come from a parser with the last node being
at the head of the vector.

Totality: total
Visibility: export
generate : (k : Nat) -> (Fink->Adjken) ->IGraphken
Totality: total
Visibility: export
mapCtxt : (Fink->Adjken->Adjke1n1) ->IGraphken->IGraphke1n1
  Map the adjacencies in a graph accoring to each node's context

Totality: total
Visibility: export
mapWithCtxt : (Fink->Adjken->n1) ->IGraphken->IGraphken1
  Map the node labels in a graph accoring to each node's context

Totality: total
Visibility: export
mapAdj : (Adjken->Adjkfm) ->IGraphken->IGraphkfm
  Map the adjacencies in a graph

Totality: total
Visibility: export
mapWithAdj : (Adjken->m) ->IGraphken->IGraphkem
  Map the node labels in a graph accoring to each node's adjacency

Totality: total
Visibility: export
traverseCtxt : Applicativef=> (Fink->Adjken->f (Adjke1n1)) ->IGraphken->f (IGraphke1n1)
Totality: total
Visibility: export
traverseWithCtxt : Applicativef=> (Fink->Adjken->fn1) ->IGraphken->f (IGraphken1)
Totality: total
Visibility: export
updateNodes : Fink-> (m->n) -> (m->n) ->IGraphkem->IGraphken
  Uses two functions for updating nodes in a graph:

Once is used for the given node, the other for all other nodes.

Totality: total
Visibility: export
updateNode : Fink-> (n->n) ->IGraphken->IGraphken
  Updates a single node in the graph at the given position.

Totality: total
Visibility: export
setNode : Fink->n->IGraphken->IGraphken
  Replaces a single node in the graph at the given position.

Totality: total
Visibility: export
updateEdges : Fink->Fink-> (e->e2) -> (e->e2) ->IGraphken->IGraphke2n
  Uses two functions for updating the edge labels in a graph.

Once is used for the edge connecting the two given nodes, the other for
all other edges.

Totality: total
Visibility: export
updateEdge : Fink->Fink-> (e->e) ->IGraphken->IGraphken
  Uses a function for updating a single edge label in a graph.

Totality: total
Visibility: export
insEdges : List (Edgeke) ->IGraphken->IGraphken
  Insert (or replace) a single edge in a graph.

Totality: total
Visibility: export
insEdge : Edgeke->IGraphken->IGraphken
  Insert an `Edge` into the 'IGraph'.

Totality: total
Visibility: export
delEdges : List (Fink, Fink) ->IGraphken->IGraphken
  Remove multiple 'Edge's from the 'Graph'.

Totality: total
Visibility: export
delEdge : Fink->Fink->IGraphken->IGraphken
  Remove an 'Edge' from the 'Graph'.

Totality: total
Visibility: export
insNodes : IGraphken->Vectmn->IGraph (k+m) en
  Insert multiple `LNode`s into the `Graph`.

Totality: total
Visibility: export
insNodesAndEdges : IGraphken->Vectmn->List (Edge (k+m) e) ->IGraph (k+m) en
  Insert multiple `LNode`s into the `Graph`.

Totality: total
Visibility: export
insNode : IGraphken->n->IGraph (Sk) en
  Insert a labeled node into the `Graph`.
The behavior is undefined if the node is already
in the graph.

Totality: total
Visibility: export
adjEdges : SortedMap (Finx) (Finy) ->Adjxen->Adjyen
Totality: total
Visibility: export
delNodes : List (Fink) ->IGraphken->Graphen
Totality: total
Visibility: export
delNode : Fink->IGraphken->Graphen
  Remove a 'Node' from the 'Graph'.

Totality: total
Visibility: export
mergeGraphsWithEdges : IGraphken->IGraphmen->List (Fink, (Finm, e)) ->IGraph (k+m) en
  Merge two graphs connecting them via the given list of
edges

Totality: total
Visibility: export
mergeGraphs : IGraphken->IGraphmen->IGraph (k+m) en
  Merge two graphs that have no bonds between them.

Totality: total
Visibility: export
pretty : (e->String) -> (n->String) ->IGraphken->String
Totality: total
Visibility: export