|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--spatial.SimpleRTreeStrategy
Class providing the operations which determine the strategy of a simple r-tree.
| Field Summary | |
protected java.util.BitSet |
indicator
Prepared indicator for the distribute operation. |
protected int |
m
The minimum number of entries in a node after a split in %. |
protected int |
reinsertFactor
Prepared indicator for the distribute operation. |
| Constructor Summary | |
SimpleRTreeStrategy()
Constructor. |
|
SimpleRTreeStrategy(int reinsertFactor)
Constructor. |
|
| Method Summary | |
int |
chooseSubtree(SpatialSearchTreeNode node,
SpatialSearchTreeEntry obj)
Determines the best subtree for inserting an new object according to the Gutman's original r-tree algorithm 1984. |
java.util.BitSet |
distribute(SpatialSearchTreeNode node,
SpatialSearchTreeEntry entry)
Distributes the entries of a node to two nodes according to a simple linear algorithm. |
int |
getMinimum()
Gets the minimum percentage of entries. |
int |
getReinsertFactor(int height)
Returns the percentage of objects which should be reinserted. |
boolean |
isOrdering()
Return false because this it not an ordering strategy. |
void |
readParameters(java.io.DataInputStream in)
Reads parameters from DataInputStream. |
void |
setMinimum(int m)
Sets the minimum percentage of entries. |
void |
setReinsertFactor(int p)
Sets the quota of entries to be reinserted. |
void |
sortAccordingTo(SpatialSearchTreeNode nd,
double[] value,
int left,
int right)
Performs the sorting of a node between two limits using quicksort and a given array with values. |
void |
sortAccordingTo(SpatialSearchTreeNode node,
double[] value,
int leftBorder,
int left,
int right)
Performs the sorting of a node between two limits using quicksort and a given array with values. |
void |
sortForReinsert(SpatialSearchTreeNode node)
Sorts the entries of the given node according to their distance to the center of the parent entry. |
void |
writeParameters(java.io.DataOutputStream out)
Writes parameters to DataOutputStream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int reinsertFactor
protected int m
protected java.util.BitSet indicator
| Constructor Detail |
public SimpleRTreeStrategy()
public SimpleRTreeStrategy(int reinsertFactor)
reinsertFactor - percentage of objects which should be reinserted (0 = no reinsert)| Method Detail |
public int chooseSubtree(SpatialSearchTreeNode node,
SpatialSearchTreeEntry obj)
chooseSubtree in interface RTreeStrategynode - non-leaf node where the object should to be insertedobj - the new object or the reinserted entry
public java.util.BitSet distribute(SpatialSearchTreeNode node,
SpatialSearchTreeEntry entry)
distribute in interface RTreeStrategynode - the nodeentry - the entry describing the node
public int getMinimum()
getMinimum in interface RTreeStrategypublic int getReinsertFactor(int height)
getReinsertFactor in interface RTreeStrategypublic boolean isOrdering()
isOrdering in interface RTreeStrategy
public void readParameters(java.io.DataInputStream in)
throws java.io.IOException
readParameters in interface RTreeStrategyin - stream
java.io.IOExceptionpublic void setMinimum(int m)
setMinimum in interface RTreeStrategym - the new valuepublic void setReinsertFactor(int p)
setReinsertFactor in interface RTreeStrategyp - the new value
public void sortAccordingTo(SpatialSearchTreeNode nd,
double[] value,
int left,
int right)
nd - the nodevalue - the array with the valuesleft - left indexright - right index
public void sortAccordingTo(SpatialSearchTreeNode node,
double[] value,
int leftBorder,
int left,
int right)
value - the array with the valuesleftBorder - the index of the first entry to be sortedleft - left indexright - right indexpublic void sortForReinsert(SpatialSearchTreeNode node)
sortForReinsert in interface RTreeStrategynode - the node
public void writeParameters(java.io.DataOutputStream out)
throws java.io.IOException
writeParameters in interface RTreeStrategyout - stream
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||