|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.persistent.AbstractPage<N>
de.lmu.ifi.dbs.elki.index.tree.AbstractNode<N,E>
de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.AbstractRStarTreeNode<N,E>
N - Node typeE - Entry typepublic abstract class AbstractRStarTreeNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>
Abstract superclass for nodes in a R*-Tree.
| Field Summary |
|---|
| Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractNode |
|---|
eclass, entries, isLeaf, numEntries |
| Constructor Summary | |
|---|---|
AbstractRStarTreeNode()
Empty constructor for Externalizable interface. |
|
AbstractRStarTreeNode(PageFile<N> file,
int capacity,
boolean isLeaf,
Class<? super E> eclass)
Creates a new AbstractRStarTreeNode with the specified parameters. |
|
| Method Summary | ||
|---|---|---|
void |
adjustEntry(E entry)
Adjusts the parameters of the entry representing this node. |
|
protected abstract N |
createNewDirectoryNode(int capacity)
Creates a new directory node with the specified capacity. |
|
protected abstract N |
createNewLeafNode(int capacity)
Creates a new leaf node with the specified capacity. |
|
int |
getDimensionality()
Returns the dimensionality of this spatial object. |
|
double |
getMax(int dimension)
Returns the maximum coordinate at the specified dimension. |
|
double |
getMin(int dimension)
Returns the minimum coordinate at the specified dimension. |
|
protected
|
initReInsert(int start,
DistanceEntry<D,E>[] reInsertEntries)
Initializes a reinsert operation. |
|
void |
integrityCheck()
Tests this node (for debugging purposes). |
|
protected void |
integrityCheckParameters(N parent,
int index)
Tests, if the parameters of the entry representing this node, are correctly set. |
|
HyperBoundingBox |
mbr()
Computes and returns the MBR of this spatial object. |
|
void |
readExternal(ObjectInput in)
Reads the id of this node, the numEntries and the entries array from the specified stream. |
|
N |
splitEntries(List<E> sorting,
int splitPoint)
Splits the entries of this node into a new node at the specified splitPoint and returns the newly created node. |
|
void |
writeExternal(ObjectOutput out)
Calls the super method and writes the id of this node, the numEntries and the entries array to the specified stream. |
|
| Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractNode |
|---|
addDirectoryEntry, addLeafEntry, children, deleteAllEntries, deleteEntry, equals, getCapacity, getEntries, getEntry, getNumEntries, increaseEntries, isLeaf, toString |
| Methods inherited from class de.lmu.ifi.dbs.elki.persistent.AbstractPage |
|---|
getFile, getID, hashCode, isDirty, setDirty, setFile, setID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.Node |
|---|
addDirectoryEntry, addLeafEntry, children, getEntry, getNumEntries, isLeaf |
| Methods inherited from interface de.lmu.ifi.dbs.elki.persistent.Page |
|---|
getID, isDirty, setDirty, setFile, setID |
| Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialObject |
|---|
getID |
| Constructor Detail |
|---|
public AbstractRStarTreeNode()
public AbstractRStarTreeNode(PageFile<N> file,
int capacity,
boolean isLeaf,
Class<? super E> eclass)
file - the file storing the R*-Treecapacity - the capacity (maximum number of entries plus 1 for
overflow) of this nodeisLeaf - indicates whether this node is a leaf nodeeclass - Entry class, to initialize array storage| Method Detail |
|---|
public double getMin(int dimension)
SpatialComparable
getMin in interface SpatialComparabledimension - the dimension for which the coordinate should be returned,
where 1 ≤ dimension ≤ getDimensionality()
public double getMax(int dimension)
SpatialComparable
getMax in interface SpatialComparabledimension - the dimension for which the coordinate should be returned,
where 1 ≤ dimension ≤ getDimensionality()
public HyperBoundingBox mbr()
SpatialNode
mbr in interface SpatialNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>public int getDimensionality()
SpatialNode
getDimensionality in interface SpatialComparablegetDimensionality in interface SpatialNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>public void adjustEntry(E entry)
entry - the entry representing this node
protected <D extends Distance<D>> void initReInsert(int start,
DistanceEntry<D,E>[] reInsertEntries)
start - the start index of the entries that will be reinsertedreInsertEntries - the array of entries to be reinserted
public N splitEntries(List<E> sorting,
int splitPoint)
sorting - the sorted entries of this nodesplitPoint - the split point of the entries
public final void integrityCheck()
protected void integrityCheckParameters(N parent,
int index)
parent - the parent holding the entry representing this nodeindex - the index of the entry in the parents child array
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>out - the stream to write the object to
IOException - Includes any I/O exceptions that may occur
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>in - the stream to read data from in order to restore the object
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being restored
cannot be found.protected abstract N createNewLeafNode(int capacity)
createNewLeafNode in class AbstractNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>capacity - the capacity of the new node
protected abstract N createNewDirectoryNode(int capacity)
createNewDirectoryNode in class AbstractNode<N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>capacity - the capacity of the new node
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||