### 5 releases

0.1.4 | May 12, 2019 |
---|---|

0.1.3 | Apr 25, 2019 |

0.1.2 | Mar 30, 2019 |

0.1.1 | Feb 20, 2019 |

0.1.0 | Feb 20, 2019 |

#**7** in #graph-algorithm

**LGPL-2.1-or-later**

24KB

475 lines

# abstractgraph - Graph algorithms on user supplied data structures

It's quite common for graph structures to be defined implicitly by other data structures. However, most graph algorithm libraries require a specific input representation of the graph, meaning you need to awkwardly convert your internal data structures into that representation first.

lets you run graph algorithms directly on your own
data structures, by having them implement traits to expose the graph structure.`abstractgraph`

Currently implemented algorithms:

- Depth First Search
- Breadth First Search
- Dijkstra's Algorithm (single source shortest path)

began as a port of the `abstractgraph`

and `aga`

modules from ccan.`agar`

## Usage

Add the following to your

:`Cargo .toml`

`[``dependencies``]`
`abstractgraph ``=` `"`0.1`"`

## License

This library is licensed under the LGPL, version 2.1 or later.

###
`lib.rs`

:

This crate implements standard graph algorithms without requiring a specific graph representation.

It's quite common for graph structures to be defined implicitly by other data structures. This crate lets you run standard graph algorithms without having to translate your data structures into a specific graph representation.

# Usage

To define a graph, implement the

trait on some
data structure can be treated as agraph. You can then run the
various generic graph algorithms which take a generic type
implementing `DirectedGraph`

.`DirectedGraph`

# History

This crate began as a port of the

and `aga`

modules
from ccan.`agar`

#### Dependencies

~1MB

~17K SLoC