Class: Whence::WeightedDirectedAcyclicGraph
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Whence::WeightedDirectedAcyclicGraph
- Defined in:
- lib/whence.rb
Instance Method Summary collapse
- #<<(vertex) ⇒ Object
-
#initialize(weight) ⇒ WeightedDirectedAcyclicGraph
constructor
A new instance of WeightedDirectedAcyclicGraph.
- #to_s ⇒ Object
Constructor Details
#initialize(weight) ⇒ WeightedDirectedAcyclicGraph
Returns a new instance of WeightedDirectedAcyclicGraph.
67 68 69 70 |
# File 'lib/whence.rb', line 67 def initialize(weight) __setobj__ nil @weight = weight end |
Instance Method Details
#<<(vertex) ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/whence.rb', line 72 def <<(vertex) if __getobj__ super else __setobj__(vertex) end end |
#to_s ⇒ Object
80 81 82 |
# File 'lib/whence.rb', line 80 def to_s __getobj__.to_s(@weight) end |