D4L / abstractGraph

MIT License
2 stars 0 forks source link

Check that graph is connected #11

Closed D4L closed 10 years ago

D4L commented 11 years ago

Connected method

Task

Need a method to see if the the graph is just one component, or if there are vertices that aren't connected to the rest of the graph.

Content

Assume graph is 3-path ( { v1, v2, v3 }, { e1, e2 } )

graph.connected?        # true
graph.delete_edge! "e1"
graph.connected?        # false
D4L commented 10 years ago

Sound fun, let's do it!