Class AbstractRStarTreeNode<N extends AbstractRStarTreeNode<N,​E>,​E extends SpatialEntry>

    • Constructor Detail

      • AbstractRStarTreeNode

        public AbstractRStarTreeNode()
        Empty constructor for Externalizable interface.
      • AbstractRStarTreeNode

        public AbstractRStarTreeNode​(int capacity,
                                     boolean isLeaf)
        Creates a new AbstractRStarTreeNode with the specified parameters.
        Parameters:
        capacity - the capacity (maximum number of entries plus 1 for overflow) of this node
        isLeaf - indicates whether this node is a leaf node
    • Method Detail

      • adjustEntry

        public boolean adjustEntry​(E entry)
        Adjusts the parameters of the entry representing this node.
        Parameters:
        entry - the entry representing this node
      • adjustEntryIncremental

        public boolean adjustEntryIncremental​(E entry,
                                              SpatialComparable responsibleMBR)
        Adjusts the parameters of the entry representing this node. Only applicable if one object was inserted or the size of an existing node increased.
        Parameters:
        entry - the entry representing this node
        responsibleMBR - the MBR of the object or node which is responsible for the call of the method
        Returns:
        true when the entry has changed
      • integrityCheck

        public final int integrityCheck​(AbstractRStarTree<N,​E,​?> tree)
        Tests this node (public for debugging purposes).
        Parameters:
        tree - Tree context
        Returns:
        levels below
      • integrityCheckParameters

        protected void integrityCheckParameters​(N parent,
                                                int index)
        Tests, if the parameters of the entry representing this node, are correctly set. Subclasses may need to overwrite this method.
        Parameters:
        parent - the parent holding the entry representing this node
        index - the index of the entry in the parents child array
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Calls the super method and writes the id of this node, the numEntries and the entries array to the specified stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class AbstractNode<E extends SpatialEntry>
        Parameters:
        out - the stream to write the object to
        Throws:
        java.io.IOException - Includes any I/O exceptions that may occur
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Reads the id of this node, the numEntries and the entries array from the specified stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class AbstractNode<E extends SpatialEntry>
        Parameters:
        in - the stream to read data from in order to restore the object
        Throws:
        java.io.IOException - if I/O errors occur
        java.lang.ClassNotFoundException - If the class for an object being restored cannot be found.