graphs
                                
                                 graphs copied to clipboard
                                
                                    graphs copied to clipboard
                            
                            
                            
                        Graph algorithms
This package has moved!
The package can now be found at https://github.com/dart-lang/tools/tree/main/pkgs/graphs
Graph algorithms that do not specify a particular approach for representing a Graph.
Functions in this package will take arguments that provide the mechanism for traversing the graph. For example two common approaches for representing a graph:
class Graph {
  Map<Node, List<Node>> nodes;
}
class Node {
  // Interesting data
}
class Graph {
  Node root;
}
class Node {
  List<Node> edges;
  // Interesting data
}
Any representation can be adapted to the needs of the algorithm:
- Some algorithms need to associate data with each node in the graph. If the
node type Tdoes not correctly or efficiently implementhashCodeor==, you may provide optionalequalsand/orhashCodefunctions are parameters.
- Algorithms which need to traverse the graph take a edgesfunction which provides the reachable nodes.- (node) => graph[node]
- (node) => node.edges
 
Graphs that are resolved asynchronously will have similar functions which
return FutureOr.