Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add Vertex Adjacency #9

Closed
D4L opened this Issue · 0 comments

1 participant

@D4L
Owner

Vertex Adjacency

Task

Allow users to ask a vertex what it's adjacent to. In other words, which other vertices it is connected by an edge with.

Content
  • Vertex Adjacency
Example

Assume graph is the 4-cycle ( { v1, v2, v4, v8 }, { edges formed with sum (e##) } )

graph.is_adjacent?( "v1", "v2" ) # => true
graph.is_adjacent?( "v1", "v4" ) # => false
graph.adjacency_list "v4"        # => [ "v2", "v8" ]
@D4L D4L closed this in dc52970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.