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
The capacity itself is always guaranteed to be a power of two, which
helps optimize a few operations.
5 files changed