Class: RGL::Edge::UnDirectedEdge
- Inherits:
-
DirectedEdge
- Object
- DirectedEdge
- RGL::Edge::UnDirectedEdge
- Defined in:
- lib/rgl/base.rb
Overview
An undirected edge is simply an undirected pair (source, target) used in undirected graphs.
Instance Method Summary collapse
Constructor Details
This class inherits a constructor from RGL::Edge::DirectedEdge
Instance Method Details
#eql?(edge) ⇒ Boolean
105 106 107 |
# File 'lib/rgl/base.rb', line 105 def eql?(edge) super || ((target == edge.source) && (source == edge.target)) end |
#to_s ⇒ String
112 113 114 |
# File 'lib/rgl/base.rb', line 112 def to_s "(#{source}=#{target})" end |