Home - lamcw/bitmap-graph GitHub Wiki

What is this?

This is a library that aims to fix the space inefficiency when using adjacency matrix for graphs. Assuming you are using a 32-bit operating system, an adjacency matrix occupies n2 × 4 bytes, where each 4 bytes represents one single entry (using 1 and 0). On a large sparse graph, adjacency lists requires much less storage because they do not waste space to represent edge that is not present.

This library is trying to reduce the space usage of an adjacency matrix by using only one bit to represent an edge in a graph. This results in a really compact representation of graph. Iteration and lookup can also be very fast.

⚠️ **GitHub.com Fallback** ⚠️