Class: RubyVor::PriorityQueue::QueueItem
- Inherits:
-
Object
- Object
- RubyVor::PriorityQueue::QueueItem
- Defined in:
- lib/ruby_vor/priority_queue.rb,
ext/ruby_vor_c.c
Overview
Implemented in C def percolate_down(i);end
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#index ⇒ Object
Returns the value of attribute index.
-
#priority ⇒ Object
Returns the value of attribute priority.
Instance Method Summary collapse
-
#initialize(p, i, d) ⇒ QueueItem
constructor
A new instance of QueueItem.
Constructor Details
#initialize(p, i, d) ⇒ QueueItem
Returns a new instance of QueueItem.
79 80 81 82 83 |
# File 'lib/ruby_vor/priority_queue.rb', line 79 def initialize(p, i, d) @priority = p @index = i @data = d end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
78 79 80 |
# File 'lib/ruby_vor/priority_queue.rb', line 78 def data @data end |
#index ⇒ Object
Returns the value of attribute index.
78 79 80 |
# File 'lib/ruby_vor/priority_queue.rb', line 78 def index @index end |
#priority ⇒ Object
Returns the value of attribute priority.
78 79 80 |
# File 'lib/ruby_vor/priority_queue.rb', line 78 def priority @priority end |