A graph should be able to add, find, and remove vertices.
recommended ruby example:
myGraph = Graph.new #=> myGraph
myGraph.addVertex "MyVertex" #=> myGraph ( has vertex included )
myGraph.hasVertex? "MyVertex" #=> true
myGraph.removeVertex "MyVertex" #=> myGraph ( myGraph unchanged )
myGraph.removeVertex! "MyVertex" #=> myGraph ( myGraph changed )
I suggest using underscores instead of camel case when working with method names. See Ruby coding conventions for more detail.
Example of change:
myGraph.add_vertex "MyVertex" #=> myGraph ( has vertex included )
Noted. Also, changing keyword remove to delete, because we aren't really keeping an instance of the vertex around after we "remove" it.
Allow graphs to add vertices. Part of vertex operations for #3 and cl…
Add 'has_vertex' to Graph. Part of #3