Class: FibonacciHeap::CircularDoublyLinkedList::Sentinel
- Inherits:
-
Object
- Object
- FibonacciHeap::CircularDoublyLinkedList::Sentinel
- Defined in:
- lib/fibonacci_heap/circular_doubly_linked_list.rb
Overview
A Sentinel node to simplify boundary conditions in the linked list.
Instance Attribute Summary collapse
-
#next ⇒ Object
Returns the value of attribute next.
-
#prev ⇒ Object
Returns the value of attribute prev.
Instance Method Summary collapse
-
#initialize ⇒ Sentinel
constructor
A new instance of Sentinel.
Constructor Details
#initialize ⇒ Sentinel
Returns a new instance of Sentinel.
13 14 15 16 |
# File 'lib/fibonacci_heap/circular_doubly_linked_list.rb', line 13 def initialize @next = self @prev = self end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
11 12 13 |
# File 'lib/fibonacci_heap/circular_doubly_linked_list.rb', line 11 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
11 12 13 |
# File 'lib/fibonacci_heap/circular_doubly_linked_list.rb', line 11 def prev @prev end |