Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add Vertex Adjacency #9
Allow users to ask a vertex what it's adjacent to. In other words, which other vertices it is connected by an edge with.
graph.is_adjacent?( "v1", "v2" ) # => true graph.is_adjacent?( "v1", "v4" ) # => false graph.adjacency_list "v4" # => [ "v2", "v8" ]