net.walend.collection
Class IntHeapMember

java.lang.Object
  |
  +--net.walend.collection.IntHeapMember
Direct Known Subclasses:
DijkstraShortestCEDistances.HeapNode, DijkstraShortestCEPaths.HeapNode, DijkstraShortestGEDistances.HeapNode, DijkstraShortestGEPaths.HeapNode, IntHeapTest.ObjectIntHeapMember

public abstract class IntHeapMember
extends java.lang.Object

IntHeapMember implements IntHeap's HeapMember interface.

Author:
David Walend dfw1@cornell.edu

Field Summary
private  IntHeapMember child
           
private  int childCount
           
private  boolean inHeap
           
private  int key
           
private  IntHeapMember left
           
private  boolean lostChild
           
private  IntHeapMember parent
           
private  IntHeapMember right
           
 
Constructor Summary
IntHeapMember()
           
 
Method Summary
 void addChild(IntHeapMember childNode, IntHeap heap)
           
private  void cat(IntHeapMember node)
           
 void cat(IntHeapMember node, IntHeap heap)
           
 void clean()
           
private  IntHeapMember getChild()
           
 IntHeapMember getChild(IntHeap heap)
           
private  int getChildCount()
           
 int getChildCount(IntHeap heap)
           
 int getKey()
           
private  IntHeapMember getLeft()
           
 IntHeapMember getLeft(IntHeap heap)
           
 IntHeapMember getParent(IntHeap heap)
           
private  IntHeapMember getRight()
           
 IntHeapMember getRight(IntHeap heap)
           
 boolean inHeap()
           
 boolean lostChild(IntHeap heap)
           
private  void remove()
           
 void remove(IntHeap heap)
           
 void removeChild(IntHeapMember childNode, IntHeap heap)
           
private  void setChild(IntHeapMember child)
           
 void setKey(int key, IntHeap heap)
           
private  void setLeft(IntHeapMember left)
           
private  void setLostChild(boolean lostChild)
           
 void setLostChild(boolean lostChild, IntHeap heap)
           
private  void setParent(IntHeapMember parent)
           
private  void setRight(IntHeapMember right)
           
 java.lang.String toString()
           
private  void validateHeap(IntHeap heap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

private int key

parent

private IntHeapMember parent

child

private IntHeapMember child

left

private IntHeapMember left

right

private IntHeapMember right

childCount

private int childCount

lostChild

private boolean lostChild

inHeap

private boolean inHeap
Constructor Detail

IntHeapMember

public IntHeapMember()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clean

public void clean()

getKey

public int getKey()

validateHeap

private void validateHeap(IntHeap heap)

inHeap

public boolean inHeap()

setKey

public void setKey(int key,
                   IntHeap heap)

remove

private void remove()

remove

public void remove(IntHeap heap)

cat

private void cat(IntHeapMember node)

cat

public void cat(IntHeapMember node,
                IntHeap heap)

addChild

public void addChild(IntHeapMember childNode,
                     IntHeap heap)

removeChild

public void removeChild(IntHeapMember childNode,
                        IntHeap heap)

getParent

public IntHeapMember getParent(IntHeap heap)

setParent

private void setParent(IntHeapMember parent)

getLeft

private IntHeapMember getLeft()

setLeft

private void setLeft(IntHeapMember left)

getLeft

public IntHeapMember getLeft(IntHeap heap)

getRight

private IntHeapMember getRight()

setRight

private void setRight(IntHeapMember right)

getRight

public IntHeapMember getRight(IntHeap heap)

getChild

private IntHeapMember getChild()

setChild

private void setChild(IntHeapMember child)

getChild

public IntHeapMember getChild(IntHeap heap)

getChildCount

private int getChildCount()

getChildCount

public int getChildCount(IntHeap heap)

lostChild

public boolean lostChild(IntHeap heap)

setLostChild

private void setLostChild(boolean lostChild)

setLostChild

public void setLostChild(boolean lostChild,
                         IntHeap heap)


Copyright (c) 2001, 2002, David Walend