class MGraph::Edge
Attributes
vertices[R]
Public Class Methods
new(a, b)
click to toggle source
# File lib/mgraph/edge.rb, line 7 def initialize a, b @vertices = [a, b].to_set.freeze freeze end
Public Instance Methods
==(other)
click to toggle source
# File lib/mgraph/edge.rb, line 12 def == other @vertices == other.vertices end
Also aliased as: eql?
hash()
click to toggle source
# File lib/mgraph/edge.rb, line 17 def hash self.class.hash ^ @vertices.hash end