mtree
Class InternalNode

java.lang.Object
  extended by mtree.Node
      extended by mtree.InternalNode
All Implemented Interfaces:
java.io.Serializable

public class InternalNode
extends Node
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
InternalNode(int level, NodeEntry parentNodeEntry, long softCapacity)
          Constructors
 
Method Summary
protected  boolean adjustParentHR()
          Adjusts the distances of HR array of the parent node.
protected  boolean adjustParentRadius()
          Adjusts the radius of the parent node.
 NodeEntry createNodeEntry(messif.objects.LocalAbstractObject p, Node subtree, int nhr)
          Creates a new node entry in this node.
 NodeEntry createNodeEntry(NodeEntry ne)
          Adds the specified node entry into this node.
 NodeEntry getNodeEntry(int pos)
          Returns the node entry at specified position.
 NodeEntry getNodeEntry(messif.objects.LocalAbstractObject o)
          Returns the node entry selected by an object stored in it.
 java.util.List<NodeEntry> getNodeEntryList()
          Returns a list of stored node entries of this node.
 int getObjectCount()
          Returns the number of stored objects in this node.
 messif.objects.util.AbstractObjectIterator<messif.objects.LocalAbstractObject> getObjects()
          Returns an iterator of all objects stored in this node.
 boolean isCapacityExceeded()
          Returns false if the capacity of this node is not exceeded.
 boolean isFreeCapacity(messif.objects.LocalAbstractObject o)
          Returns false if the capacity of this node after inserting object o will be exceeded.
 boolean removeNodeEntry(NodeEntry ne)
          Removes the specified node entry from this node.
 boolean removeNodeEntry(NodeEntry ne, java.util.Iterator<NodeEntry> nodeEntryIterator)
          Removes the specified node entry from this node.
 java.lang.String toString()
          Overrided class Object
 
Methods inherited from class mtree.Node
createRootNode, getLevel, getParentNode, getParentNodeEntry, getParentRadius, getSortedObjectList, isLastInternalNode, isLeaf, updateDistances
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalNode

public InternalNode(int level,
                    NodeEntry parentNodeEntry,
                    long softCapacity)
Constructors

Method Detail

isFreeCapacity

public boolean isFreeCapacity(messif.objects.LocalAbstractObject o)
Returns false if the capacity of this node after inserting object o will be exceeded.

Returns:
false if the capacity of this node after inserting object o will be exceeded

createNodeEntry

public NodeEntry createNodeEntry(messif.objects.LocalAbstractObject p,
                                 Node subtree,
                                 int nhr)
Creates a new node entry in this node.

Parameters:
nhr - length of HR array
Returns:
a new node entry

createNodeEntry

public NodeEntry createNodeEntry(NodeEntry ne)
Adds the specified node entry into this node.

Returns:
added node entry

getNodeEntry

public NodeEntry getNodeEntry(int pos)
Returns the node entry at specified position.

Returns:
the node entry at specified position

getNodeEntry

public NodeEntry getNodeEntry(messif.objects.LocalAbstractObject o)
Returns the node entry selected by an object stored in it.

Returns:
the node entry selected by an object stored in it

getNodeEntryList

public java.util.List<NodeEntry> getNodeEntryList()
Returns a list of stored node entries of this node.

Returns:
a list of stored node entries of this node

removeNodeEntry

public boolean removeNodeEntry(NodeEntry ne)
Removes the specified node entry from this node.

Returns:
true if the specified node entry has been removed

removeNodeEntry

public boolean removeNodeEntry(NodeEntry ne,
                               java.util.Iterator<NodeEntry> nodeEntryIterator)
Removes the specified node entry from this node.

Returns:
true if the specified node entry has been removed

isCapacityExceeded

public boolean isCapacityExceeded()
Returns false if the capacity of this node is not exceeded.

Specified by:
isCapacityExceeded in class Node
Returns:
false if the capacity of this node is not exceeded

getObjectCount

public int getObjectCount()
Returns the number of stored objects in this node.

Specified by:
getObjectCount in class Node
Returns:
the number of stored objects in this node

getObjects

public messif.objects.util.AbstractObjectIterator<messif.objects.LocalAbstractObject> getObjects()
Returns an iterator of all objects stored in this node.

Specified by:
getObjects in class Node
Returns:
an iterator of all objects stored in this node

adjustParentRadius

protected boolean adjustParentRadius()
Adjusts the radius of the parent node.

Specified by:
adjustParentRadius in class Node
Returns:
false if the radius of the parent node hasn't needed to be adjusted

adjustParentHR

protected boolean adjustParentHR()
Adjusts the distances of HR array of the parent node.

Specified by:
adjustParentHR in class Node
Returns:
false if the distances of the parent node haven't needed to be adjusted

toString

public java.lang.String toString()
Overrided class Object

Overrides:
toString in class java.lang.Object