class Silicium::Graphs::UnorientedGraph
Class represents unoriented graph
Public Instance Methods
add_edge!(from, to)
click to toggle source
Adds edge to graph
# File lib/graph.rb, line 197 def add_edge!(from, to) protected_add_edge!(from, to) protected_add_edge!(to, from) @edge_number += 1 end
delete_edge!(from, to)
click to toggle source
Deletes edge from graph
# File lib/graph.rb, line 210 def delete_edge!(from, to) protected_delete_edge!(from, to) protected_delete_edge!(to, from) @edge_number -= 1 end
label_edge!(from, to, label)
click to toggle source
Adds label to edge
Calls superclass method
Silicium::Graphs::OrientedGraph#label_edge!
# File lib/graph.rb, line 204 def label_edge!(from, to, label) super(from, to, label) super(to, from, label) end