mtree
Class LeafNode

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

public class LeafNode
extends Node
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
LeafNode(NodeEntry parentNodeEntry, messif.buckets.LocalBucket bucket)
          Constructors
 
Method Summary
protected  boolean adjustParentHR()
          Adjusts the distances of HR array of the parent node.
protected  boolean adjustParentHR(messif.objects.LocalAbstractObject o)
          Sets the distances of HR array of the parent node according to the object o.
protected  boolean adjustParentRadius()
          Adjusts the radius of the parent node.
protected  boolean adjustParentRadius(float r)
          Sets the radius of the parent node.
 int deleteObject(messif.objects.LocalAbstractObject o)
          Deletes the specified object from the bucket.
 messif.buckets.LocalBucket getBucket()
          Returns the bucket of this leaf.
 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.
 java.lang.String toString()
          Overrided class Object
 boolean updateDistances(float r)
          Sets the radius r and adjusts the distances of HR array of the parent node.
 boolean updateDistances(float r, messif.objects.LocalAbstractObject o)
          Sets the radius r and adjusts the distances of HR array of the parent node according to the object o.
 
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

LeafNode

public LeafNode(NodeEntry parentNodeEntry,
                messif.buckets.LocalBucket bucket)
Constructors

Method Detail

getBucket

public messif.buckets.LocalBucket getBucket()
Returns the bucket of this leaf.

Returns:
the bucket of this leaf

deleteObject

public int deleteObject(messif.objects.LocalAbstractObject o)
Deletes the specified object from the bucket.

Returns:
the number of deleted objects

adjustParentRadius

protected boolean adjustParentRadius(float r)
Sets the radius of the parent node.

Returns:
false if the radius of the parent node hasn't needed to be adjusted

adjustParentHR

protected boolean adjustParentHR(messif.objects.LocalAbstractObject o)
Sets the distances of HR array of the parent node according to the object o.

Returns:
false if the distances of the parent node haven't needed to be adjusted

updateDistances

public boolean updateDistances(float r)
Sets the radius r and adjusts the distances of HR array of the parent node.

Returns:
false if the radius and the distances of HR array of the parent node haven't needed to be adjusted

updateDistances

public boolean updateDistances(float r,
                               messif.objects.LocalAbstractObject o)
Sets the radius r and adjusts the distances of HR array of the parent node according to the object o.

Returns:
false if the radius and the distances of HR array of the parent node haven't needed to be adjusted

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