Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants
Class TopologicalSplit<E extends SpatialEntry>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.TopologicalSplit<E>

 class TopologicalSplit<E extends SpatialEntry>
extends Object

Encapsulates the required parameters for a topological split of a R*-Tree.

Author:
Elke Achtert

Field Summary
private  int bestSorting
          Indicates wether the sorting according to maximal or to minmal value has been used for chosing the split axis and split point.
private  List<E> maxSorting
          The entries sorted according to their max values of their MBRs.
private  List<E> minSorting
          The entries sorted according to their min values of their MBRs.
private  int splitAxis
          The split axis.
private  int splitPoint
          The index of the split point.
 
Constructor Summary
TopologicalSplit(List<E> entries, int minEntries)
          Creates a new Split object.
 
Method Summary
private  void chooseSplitAxis(List<E> entries, int minEntries)
          Chooses a split axis.
private  void chooseSplitPoint(int minEntries)
          Chooses a split axis.
 int getBestSorting()
          Returns wether the sorting according to maximal or to minmal value has been used for chosing the split axis and split point.
 List<E> getMaxSorting()
          Returns the entries to be splitted sorted according to their max values of their MBRs.
 List<E> getMinSorting()
          Returns the entries to be splitted sorted according to their min values of their MBRs.
 int getSplitAxis()
          Returns the split axis.
 int getSplitPoint()
          Returns the split point.
private  HyperBoundingBox mbr(List<E> entries, int from, int to)
          Computes and returns the mbr of the specified nodes, only the nodes between from and to index are considered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

splitAxis

private int splitAxis
The split axis.


splitPoint

private int splitPoint
The index of the split point.


bestSorting

private int bestSorting
Indicates wether the sorting according to maximal or to minmal value has been used for chosing the split axis and split point.


maxSorting

private List<E extends SpatialEntry> maxSorting
The entries sorted according to their max values of their MBRs.


minSorting

private List<E extends SpatialEntry> minSorting
The entries sorted according to their min values of their MBRs.

Constructor Detail

TopologicalSplit

public TopologicalSplit(List<E> entries,
                        int minEntries)
Creates a new Split object.

Parameters:
entries - the entries to be split
minEntries - number of minimum entries in the node to be split
Method Detail

getSplitAxis

public int getSplitAxis()
Returns the split axis.

Returns:
the split axis

getSplitPoint

public int getSplitPoint()
Returns the split point.

Returns:
the split point

getMaxSorting

public List<E> getMaxSorting()
Returns the entries to be splitted sorted according to their max values of their MBRs.

Returns:
the entries sorted according to their max values of their MBRs

getMinSorting

public List<E> getMinSorting()
Returns the entries to be splitted sorted according to their min values of their MBRs.

Returns:
the entries sorted according to their min values of their MBRs

getBestSorting

public int getBestSorting()
Returns wether the sorting according to maximal or to minmal value has been used for chosing the split axis and split point.

Returns:
SpatialComparator.MIN if the sorting according to minmal value has been used, SpatialComparator.MAX otherwise

chooseSplitAxis

private void chooseSplitAxis(List<E> entries,
                             int minEntries)
Chooses a split axis.

Parameters:
entries - the entries to be split
minEntries - number of minimum entries in the node to be split

chooseSplitPoint

private void chooseSplitPoint(int minEntries)
Chooses a split axis.

Parameters:
minEntries - number of minimum entries in the node to be split

mbr

private HyperBoundingBox mbr(List<E> entries,
                             int from,
                             int to)
Computes and returns the mbr of the specified nodes, only the nodes between from and to index are considered.

Parameters:
entries - the array of nodes
from - the start index
to - the end index
Returns:
the mbr of the specified nodes

Release 0.1 (2008-07-10_1838)