mtree.utils
Class Split

java.lang.Object
  extended by mtree.utils.Split

public class Split
extends java.lang.Object


Nested Class Summary
static class Split.Edge
          Static class used for building the spanning tree.
 
Constructor Summary
Split()
           
 
Method Summary
static void completeSplitPolicy(messif.buckets.split.SplitPolicy sp, MTree mtree)
          Determining and computing the missing parameters of the split policy.
static float fillDistances(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap, messif.objects.LocalAbstractObject p)
          Fills the distances between pivot p and other objects of a given component (the component is determined by pivot p).
static java.util.List<messif.objects.LocalAbstractObject> findAllObjectsInComponent(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap, messif.objects.LocalAbstractObject o)
          Returns a list of objects which belong to one component (component is determined by object o).
static Split.Edge findBestSpanEdge(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap, java.util.Set<Split.Edge> spanSet)
          Returns an edge which is the most convenient to divide the spanning tree into 2 components.
static messif.objects.LocalAbstractObject findPivot(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap, java.util.List<messif.objects.LocalAbstractObject> objectList)
          Looks for a pivot (the most convenient object) from the list of objects objectList.
static boolean formsOneComponent(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap, messif.objects.LocalAbstractObject o1, messif.objects.LocalAbstractObject o2)
          Decides whether objects o1 and o2 belong to one component determined by edges stored in objectMap.
static void setParentDistances(messif.buckets.split.SplitPolicy sp)
          Sets the parent distance of the split policy pivots to the distance between the pivot and the last processed object.
static void setParentDistances(messif.buckets.split.SplitPolicy sp, float dist)
          Sets the parent distance of the split policy pivots to the given distance.
static void setParentDistances(messif.buckets.split.SplitPolicy sp, messif.objects.LocalAbstractObject o)
          Computes and sets the parent distance of the split policy pivots to the distance between the pivot and the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Split

public Split()
Method Detail

formsOneComponent

public static boolean formsOneComponent(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap,
                                        messif.objects.LocalAbstractObject o1,
                                        messif.objects.LocalAbstractObject o2)
Decides whether objects o1 and o2 belong to one component determined by edges stored in objectMap.

Returns:
true if objects o1 and o2 belong to one component

findAllObjectsInComponent

public static java.util.List<messif.objects.LocalAbstractObject> findAllObjectsInComponent(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap,
                                                                                           messif.objects.LocalAbstractObject o)
Returns a list of objects which belong to one component (component is determined by object o).

Returns:
a list of objects which belong to one component (component is determined by object o)

findPivot

public static messif.objects.LocalAbstractObject findPivot(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap,
                                                           java.util.List<messif.objects.LocalAbstractObject> objectList)
Looks for a pivot (the most convenient object) from the list of objects objectList.

Returns:
a pivot (the most convenient object) from the list of objects objectList

findBestSpanEdge

public static Split.Edge findBestSpanEdge(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap,
                                          java.util.Set<Split.Edge> spanSet)
Returns an edge which is the most convenient to divide the spanning tree into 2 components.

Returns:
an edge which is the most convenient to divide the spanning tree into 2 components

fillDistances

public static float fillDistances(java.util.Map<messif.objects.LocalAbstractObject,java.util.List<Split.Edge>> objectMap,
                                  messif.objects.LocalAbstractObject p)
Fills the distances between pivot p and other objects of a given component (the component is determined by pivot p).

Returns:
covering radius of the pivot p

setParentDistances

public static void setParentDistances(messif.buckets.split.SplitPolicy sp,
                                      float dist)
Sets the parent distance of the split policy pivots to the given distance.


setParentDistances

public static void setParentDistances(messif.buckets.split.SplitPolicy sp,
                                      messif.objects.LocalAbstractObject o)
Computes and sets the parent distance of the split policy pivots to the distance between the pivot and the given object.


setParentDistances

public static void setParentDistances(messif.buckets.split.SplitPolicy sp)
Sets the parent distance of the split policy pivots to the distance between the pivot and the last processed object.


completeSplitPolicy

public static void completeSplitPolicy(messif.buckets.split.SplitPolicy sp,
                                       MTree mtree)
Determining and computing the missing parameters of the split policy.