11# Your basic graph
22
3- Golang library of basic graph algorithms
3+ ### Golang library of basic graph algorithms
44
55![ Topological ordering] ( top.png )
66
77* Topological ordering, image by [ David Eppstein] [ de ] , [ CC0 1.0] [ cc010 ] .*
88
9- ### Generic graph algorithms
9+ This library offers efficient and well-tested algorithms for
10+
11+ - breadth-first and depth-first search,
12+ - topological ordering,
13+ - strongly and weakly connected components,
14+ - bipartion,
15+ - shortest paths,
16+ - maximum flow,
17+ - Euler walks,
18+ - and minimum spanning trees.
1019
1120The algorithms can be applied to any graph data structure implementing
12- the two Iterator methods: Order, which returns the number of vertices,
13- and Visit, which iterates over the neighbors of a vertex.
21+ the two ` Iterator ` methods: ` Order ` , which returns the number of vertices,
22+ and ` Visit ` , which iterates over the neighbors of a vertex.
1423
1524All algorithms operate on directed graphs with a fixed number
1625of vertices, labeled from 0 to n-1, and edges with integer cost.
@@ -21,21 +30,21 @@ is both directed and undirected.
2130
2231### Graph data structures
2332
24- The type Mutable represents a directed graph with a fixed number
33+ The type ` Mutable ` represents a directed graph with a fixed number
2534of vertices and weighted edges that can be added or removed.
2635The implementation uses hash maps to associate each vertex
2736in the graph with its adjacent vertices. This gives constant
2837time performance for all basic operations.
2938
30- The type Immutable is a compact representation of an immutable graph.
39+ The type ` Immutable ` is a compact representation of an immutable graph.
3140The implementation uses lists to associate each vertex in the graph
3241with its adjacent vertices. This makes for fast and predictable
3342iteration: the Visit method produces its elements by reading
34- from a fixed sorted precomputed list. This type supports multigraphs.
43+ from a fixed sorted precomputed list.
3544
3645### Virtual graphs
3746
38- The subpackage graph/build offers a tool for building virtual graphs.
47+ The subpackage ` graph/build ` offers a tool for building virtual graphs.
3948In a virtual graph no vertices or edges are stored in memory,
4049they are instead computed as needed. New virtual graphs are constructed
4150by composing and filtering a set of standard graphs, or by writing
@@ -61,7 +70,7 @@ There is an online reference for the package at
6170* Version numbers adhere to [ semantic versioning] [ sv ] .
6271
6372The only accepted reason to modify the API of this package is to
64- handle bug fixes that can't be resolved in any other reasonable way.
73+ handle issues that can't be resolved in any other reasonable way.
6574
6675New features and performance enhancements are limited to basic
6776algorithms and data structures, akin to the ones that you might find
0 commit comments