ROSE  0.9.9.139

Demo of indexing graph vertices that are strings.

This demo creates a graph whose vertices are unique city names (std::string) and whose edges are the time in hours it takes to travel from the source to the target city by train, including layovers (double). We want the vertices to be indexed so we don't have to keep track of them ourselves–we want to be able to look up a vertex in logarithmic time.

Collaboration diagram for Indexing string vertices: