de.tubs.cs.sc.casim
Class PositionHeap

java.lang.Object
  |
  +--de.tubs.cs.sc.casim.PositionHeap

public class PositionHeap
extends java.lang.Object

manages a heap which contains areference to each cell, with the position and the time to do the next update (a double). The element with the smallest time can be extracted.


Method Summary
protected  void addToHeap(de.tubs.cs.sc.casim.HeapElement he)
          adds an element to the heap (assumes that not more than lx-1 elements are there.
protected  de.tubs.cs.sc.casim.HeapElement deleteFromHeap()
          returns the element with the smallets time and removes it from the heap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addToHeap

protected void addToHeap(de.tubs.cs.sc.casim.HeapElement he)
adds an element to the heap (assumes that not more than lx-1 elements are there.


deleteFromHeap

protected de.tubs.cs.sc.casim.HeapElement deleteFromHeap()
returns the element with the smallets time and removes it from the heap. This takes some time O(log n), since the first position must be refilled.