edu.jhu.skiplist
Class SkipList
java.lang.Object
|
+--edu.jhu.skiplist.SkipList
- public class SkipList
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
SkipList
public SkipList(float prob)
SkipList
public SkipList(long maxNodes)
SkipList
public SkipList(float probability,
int maxLevel)
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()