Class: Edge
- Inherits:
-
Object
- Object
- Edge
- Defined in:
- lib/zadt/AbstractDataTypes/Graph/edge.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Made up of a.
-
#value ⇒ Object
Contains.
Instance Method Summary collapse
-
#initialize(v1, v2, value = Hash.new) ⇒ Edge
constructor
A new instance of Edge.
- #inspect ⇒ Object
Constructor Details
#initialize(v1, v2, value = Hash.new) ⇒ Edge
6 7 8 9 |
# File 'lib/zadt/AbstractDataTypes/Graph/edge.rb', line 6 def initialize(v1, v2, value = Hash.new) @connection = [v1, v2] @value = value end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Made up of a
3 4 5 |
# File 'lib/zadt/AbstractDataTypes/Graph/edge.rb', line 3 def connection @connection end |
#value ⇒ Object
Contains
5 6 7 |
# File 'lib/zadt/AbstractDataTypes/Graph/edge.rb', line 5 def value @value end |
Instance Method Details
#inspect ⇒ Object
11 12 13 |
# File 'lib/zadt/AbstractDataTypes/Graph/edge.rb', line 11 def inspect @connection.to_s end |