Class: Pwrake::PriorityHrfQueueArray

Inherits:
PriorityQueueArray show all
Includes:
HrfQueue
Defined in:
lib/pwrake/queue/queue_array.rb

Overview

Priority + HRF

Instance Method Summary collapse

Methods included from HrfQueue

#check, #hrf_delete, #hrf_get, #hrf_init, #hrf_push, #pop_last_rank

Methods inherited from PriorityQueueArray

#index

Constructor Details

#initialize(n) ⇒ PriorityHrfQueueArray

Returns a new instance of PriorityHrfQueueArray.



224
225
226
227
# File 'lib/pwrake/queue/queue_array.rb', line 224

def initialize(n)
  super(n)
  hrf_init(n)
end

Instance Method Details

#pop_superObject



239
240
241
# File 'lib/pwrake/queue/queue_array.rb', line 239

def pop_super
  pop
end

#push(t) ⇒ Object



229
230
231
232
# File 'lib/pwrake/queue/queue_array.rb', line 229

def push(t)
  super(t)
  hrf_push(t)
end

#shiftObject



234
235
236
237
# File 'lib/pwrake/queue/queue_array.rb', line 234

def shift
  return nil if empty?
  hrf_get
end