Class: DSA::PriorityQueueNode
- Inherits:
-
Object
- Object
- DSA::PriorityQueueNode
- Defined in:
- lib/DSA/priority_queue.rb
Instance Attribute Summary collapse
-
#element ⇒ Object
Returns the value of attribute element.
-
#priority ⇒ Object
Returns the value of attribute priority.
Instance Method Summary collapse
-
#initialize(priority, element) ⇒ PriorityQueueNode
constructor
A new instance of PriorityQueueNode.
Constructor Details
#initialize(priority, element) ⇒ PriorityQueueNode
Returns a new instance of PriorityQueueNode.
4 5 6 7 |
# File 'lib/DSA/priority_queue.rb', line 4 def initialize( priority, element ) @priority = priority @element = element end |
Instance Attribute Details
#element ⇒ Object
Returns the value of attribute element.
3 4 5 |
# File 'lib/DSA/priority_queue.rb', line 3 def element @element end |
#priority ⇒ Object
Returns the value of attribute priority.
3 4 5 |
# File 'lib/DSA/priority_queue.rb', line 3 def priority @priority end |