com.badlogic.gdx.utils
Class BinaryHeap<T extends BinaryHeap.Node>

java.lang.Object
  extended by com.badlogic.gdx.utils.BinaryHeap<T>

public class BinaryHeap<T extends BinaryHeap.Node>
extends Object

Author:
Nathan Sweet

Nested Class Summary
static class BinaryHeap.Node
           
 
Field Summary
 int size
           
 
Constructor Summary
BinaryHeap()
           
BinaryHeap(int capacity, boolean isMaxHeap)
           
 
Method Summary
 T add(T node)
           
 T add(T node, float value)
           
 void clear()
           
 T peek()
           
 T pop()
           
 T remove(T node)
           
 void setValue(T node, float value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

size

public int size
Constructor Detail

BinaryHeap

public BinaryHeap()

BinaryHeap

public BinaryHeap(int capacity,
                  boolean isMaxHeap)
Method Detail

add

public T add(T node)

add

public T add(T node,
             float value)

peek

public T peek()

pop

public T pop()

remove

public T remove(T node)

clear

public void clear()

setValue

public void setValue(T node,
                     float value)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.