Class: RubyVor::PriorityQueue::QueueItem

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dataObject

Returns the value of attribute data.



78
79
80
# File 'lib/ruby_vor/priority_queue.rb', line 78

def data
  @data
end

#indexObject

Returns the value of attribute index.



78
79
80
# File 'lib/ruby_vor/priority_queue.rb', line 78

def index
  @index
end

#priorityObject

Returns the value of attribute priority.



78
79
80
# File 'lib/ruby_vor/priority_queue.rb', line 78

def priority
  @priority
end