|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.jhu.htm.core.HTMrange
Handles a range of HTM ids using skip lists. This is a neat way to handle large numbers of HTMids. Basically not all ids are stored rather a set of ranges of ids are kept whereby all ids in the range are in the set. This also allows for ranges of different depths to be included in the same list if so required.
Current Version =============== ID: $Id: HTMrange.java,v 1.3 2003/03/05 19:22:24 womullan Exp $ Revision: $Revision: 1.3 $ Date/time: $Date: 2003/03/05 19:22:24 $
Field Summary | |
static int |
GAP_HISTO_SIZE
|
static int |
HIGHS
|
static int |
InclAdjacentXXX
|
static int |
InclHi
|
static int |
InclInside
|
static int |
InclLo
|
static int |
InclOutside
|
static int |
INSIDE
|
static int |
INTERSECT
|
static int |
LOWS
|
protected SkipList |
my_his
|
protected SkipList |
my_los
|
static int |
OUTSIDE
|
static float |
SKIP_PROB
|
Constructor Summary | |
HTMrange()
|
Method Summary | |
void |
addRange(long lo,
long hi)
simply add this range - no checks performed the lo is added to the lows and the high is added to the highs |
long |
bestgap(int desiredSize)
return the smallest gapsize at which rangelist would be smaller than desired size |
int |
compare(HTMrange other)
this is not imlemented properly |
void |
defrag()
merge contiguous ranges |
void |
defrag(long gap)
checks that the gap between intervals is at least gap. |
void |
finalize()
|
long[] |
getNext()
returns the next hlo,hi pair in the long[] this is like an iterator but it can only be used by one thread i.e. |
int |
isIn(HTMrange otherRange)
Check if the range contains the given range. |
boolean |
isIn(long key)
does the range contain this key calls inside and simplifies answer to boolean |
int |
isIn(long a,
long b)
Check if the range a to b is contained in this set. |
void |
levelto(int depth)
not implemented |
void |
mergeRange(long lo,
long hi)
Add the given range to this set. |
int |
nranges()
return the number of ranges |
void |
purge()
|
void |
reset()
reset the hi and lo iterators |
long |
stats(int desiredSize)
|
int |
tinside(long mid)
check if mid is included in this set |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean symbolic)
converts the lo,his pairs to HTM names if sybolic is true |
java.lang.String |
toString(int what,
boolean symbolic)
return only his or lows (statics defined on this class) according to what is passed in what. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int LOWS
public static final int HIGHS
public static final int INSIDE
public static final int OUTSIDE
public static final int INTERSECT
public static final int GAP_HISTO_SIZE
public static final float SKIP_PROB
public static final int InclOutside
public static final int InclInside
public static final int InclLo
public static final int InclHi
public static final int InclAdjacentXXX
protected SkipList my_los
protected SkipList my_his
Constructor Detail |
public HTMrange()
Method Detail |
public void finalize()
finalize
in class java.lang.Object
public int compare(HTMrange other)
public int isIn(long a, long b)
public boolean isIn(long key)
public int isIn(HTMrange otherRange)
public int tinside(long mid)
public void mergeRange(long lo, long hi)
public void addRange(long lo, long hi)
public void defrag(long gap)
public void defrag()
public void levelto(int depth)
public void purge()
public void reset()
public int nranges()
public long bestgap(int desiredSize)
public long stats(int desiredSize)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean symbolic) throws HTMException
HTMException
public long[] getNext()
public java.lang.String toString(int what, boolean symbolic) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |