edu.jhu.skiplist
Class SkipList

java.lang.Object
  |
  +--edu.jhu.skiplist.SkipList

public class SkipList
extends java.lang.Object


Field Summary
static long HEADER_KEY
           
protected  SkipListElement iter
           
protected  int myLength
           
static long NIL_KEY
           
static long NOT_FOUND
           
static float OPT_PROB
           
static long SKIPLIST_MAXLEVEL
           
 
Constructor Summary
SkipList(float prob)
           
SkipList(float probability, int maxLevel)
           
SkipList(long maxNodes)
           
 
Method Summary
 void delete(long searchKey)
           
 java.lang.String elementsToString()
           
 long findMAX(long search)
           
 long findMIN(long searchlong)
           
 void freeRange(long lo, long hi)
           
protected  int generateRandomLevel()
           
 SkipListElement getHeader()
           
 long getkey()
           
 int getLength()
           
 int getLevel()
           
 int getMaxLevel()
           
 long getNthint(int n)
           
 float getProbability()
           
 long getvalue()
           
 void insert(long searchKey, long value)
           
 void reset()
           
 long search(long searchKey)
           
 long search(long searchlong, long iterator_flag)
           
 long searchAlt(long searchlong)
           
 void stat()
           
 boolean step()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_FOUND

public static final long NOT_FOUND
See Also:
Constant Field Values

HEADER_KEY

public static final long HEADER_KEY
See Also:
Constant Field Values

SKIPLIST_MAXLEVEL

public static final long SKIPLIST_MAXLEVEL
See Also:
Constant Field Values

NIL_KEY

public static final long NIL_KEY
See Also:
Constant Field Values

OPT_PROB

public static final float OPT_PROB
See Also:
Constant Field Values

myLength

protected int myLength

iter

protected SkipListElement iter
Constructor Detail

SkipList

public SkipList(float prob)

SkipList

public SkipList(long maxNodes)

SkipList

public SkipList(float probability,
                int maxLevel)
Method Detail

generateRandomLevel

protected int generateRandomLevel()

insert

public void insert(long searchKey,
                   long value)

search

public long search(long searchKey)

delete

public void delete(long searchKey)

toString

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

elementsToString

public java.lang.String elementsToString()

getLevel

public int getLevel()

getMaxLevel

public int getMaxLevel()

getProbability

public float getProbability()

getHeader

public SkipListElement getHeader()

getNthint

public long getNthint(int n)

reset

public void reset()

step

public boolean step()

getkey

public long getkey()

getvalue

public long getvalue()

findMAX

public long findMAX(long search)

searchAlt

public long searchAlt(long searchlong)

findMIN

public long findMIN(long searchlong)

search

public long search(long searchlong,
                   long iterator_flag)

freeRange

public void freeRange(long lo,
                      long hi)

stat

public void stat()

getLength

public int getLength()