commit | 8e3c5f3f4ace36061645b6cae2a311a32f157f7f | [log] [tgz] |
---|---|---|

author | Jean-Marie Comets <jean.marie.comets@gmail.com> | Sat Jan 07 00:13:32 2017 +0100 |

committer | Jean-Marie Comets <jean.marie.comets@gmail.com> | Sat Sep 28 13:02:47 2019 +0200 |

tree | 0fb1e615e69db1990128301f8f9483226064abc3 | |

parent | 0df25de6539416d46d8b1ed2af8f58078cf2aa9d [diff] |

MatrixGraph: add initial implementation This commit adds a `Matrix` which implements all graph traits using a dense adjacency matrix for its underlying structure. The matrix itself is represented as a flat array where each entry is an edge. A node's outgoing edges are all the entries in [n..n+capacity], the capacity being the number of nodes the matrix can hold until the next resize. The capacity itself is always guaranteed to be a power of two, which helps optimize a few operations.

- Cargo.toml[diff]
- README.rst[diff]
- benches/matrix_graph.rs[Added - diff]
- src/lib.rs[diff]
- src/matrix_graph.rs[Added - diff]

5 files changed

tree: 0fb1e615e69db1990128301f8f9483226064abc3