de.lmu.ifi.dbs.elki.index.tree.spatial
Class BulkSplit
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.index.tree.spatial.BulkSplit
- All Implemented Interfaces:
- Loggable
public class BulkSplit
- extends AbstractLoggable
Encapsulates the required parameters for a bulk split of a spatial index.
- Author:
- Elke Achtert
Nested Class Summary |
static class |
BulkSplit.Strategy
Available strategies for bulk loading. |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BulkSplit
public BulkSplit()
partition
public List<List<SpatialObject>> partition(List<SpatialObject> spatialObjects,
int minEntries,
int maxEntries,
BulkSplit.Strategy strategy)
- Partitions the specified feature vectors according to the chosen strategy.
- Parameters:
spatialObjects
- the spatial objects to be partionedminEntries
- the minimum number of entries in a partitionmaxEntries
- the maximum number of entries in a partitionstrategy
- the bulk load strategy
- Returns:
- the partition of the specified spatial objects according to the chosen strategy
maximalExtensionPartition
private List<List<SpatialObject>> maximalExtensionPartition(List<SpatialObject> spatialObjects,
int minEntries,
int maxEntries)
- Partitions the specified feature vectors where the split axes are the
dimensions with maximum extension
- Parameters:
spatialObjects
- the spatial objects to be partionedminEntries
- the minimum number of entries in a partitionmaxEntries
- the maximum number of entries in a partition
- Returns:
- the partition of the specified spatial objects
zValuePartition
private List<List<SpatialObject>> zValuePartition(List<SpatialObject> spatialObjects,
int minEntries,
int maxEntries)
- Partitions the spatial objects according to their z-values.
- Parameters:
spatialObjects
- the spatial objects to be partitionedminEntries
- the minimum number of entries in a partitionmaxEntries
- the maximum number of entries in a partition
- Returns:
- A partition of the spatial objects according to their z-values
chooseMaximalExtendedSplitAxis
private int chooseMaximalExtendedSplitAxis(List<SpatialObject> objects)
- Computes and returns the best split axis. The best split axis
is the split axes with the maximal extension.
- Parameters:
objects
- the spatial objects to be splitted
- Returns:
- the best split axis
chooseBulkSplitPoint
private int chooseBulkSplitPoint(int numEntries,
int minEntries,
int maxEntries)
- Computes and returns the best split point.
- Parameters:
numEntries
- the number of entries to be splitminEntries
- the number of minimum entries in the node to be splitmaxEntries
- number of maximum entries in the node to be split
- Returns:
- the best split point