Method: Plexus::GraphBuilder#-
- Defined in:
- lib/plexus/graph.rb
#-(other) ⇒ Graph
Removes all vertices in the specified graph.
567 568 569 570 571 572 573 574 575 576 |
# File 'lib/plexus/graph.rb', line 567 def -(other) case other when Plexus::Graph induced_subgraph(vertices - other.vertices) when Plexus::Arc self.class.new(self).remove_edge!(other) else self.class.new(self).remove_vertex!(other) end end |