directed_graph library Null safety

Dart implementation of directed graphs. Provides methods to

  • add/remove edges,
  • check if the graph is acyclic,
  • retrieve cycles,
  • retrieve a list of vertices in topological order.

Classes

BidirectedGraph<T extends Object>
Graph with bidirected edges represented by a directed graph with symmetric edges.
DirectedGraph<T extends Object>
Generic directed graph storing vertices of type T. [...]
GraphCrawler<T extends Object>
Utility class for crawling a graph defined by edges and retrieving paths and walks. [...]
WeightedDirectedGraph<T extends Object, W extends Comparable>
A directed graph with vertices of type T and a weight of type W associated with each directed edges. [...]

Extensions

GraphUtils
Provides access to functions offered by the library graphs
SortMap
Extension providing the methods sortByKey and sortByValue for sorting a Map<K extends Object, V extends Object> in place.
SortSet
Extension providing the method sort for sorting a Set<T extends Object> in place.

Constants

largeInt → const int
Constant holding the largest (smi) int. [...]
1073741823

Typedefs

Edges<T extends Object> = Iterable<T> Function(T vertex)
Function returning an Iterable<T> representing edge vertices. [...]
Summation<W> = W Function(W left, W right)
Function used to sum edge weights.