ROSE 0.11.145.147

Demo of using a hash-based mechanism for the vertex index.

By default, Sawyer uses a balanced binary tree for the index which guarantees logarithmic insert, erase, and lookup times. However, the library also directly supports a hash-based index with O(N) time but which is nominally constant time if a good hash algorithm is used.

Each graph vertex is information about a person and the edges represent relationships although for simplicity this example doesn't actually store any information about the kinds of relationships.

Collaboration diagram for Using a hash-based lookup: