DATA - The type of the data objects.public static class PartitionFunctions.BalancedPartition<DATA> extends Object implements PartitionFunction<DATA>
| Constructor and Description |
|---|
PartitionFunctions.BalancedPartition() |
public PartitionFunctions.BalancedPartition()
public Pair<Set<DATA>> process(Pair<DATA> promoted, Set<DATA> dataSet, DistanceFunction<? super DATA> distanceFunction)
The algorithm is roughly equivalent to this:
While dataSet is not Empty:
X := The object in dataSet which is nearest to promoted.first
Remove X from dataSet
Add X to result.first
Y := The object in dataSet which is nearest to promoted.second
Remove Y from dataSet
Add Y to result.second
Return result
process in interface PartitionFunction<DATA>promoted - The pair of data objects that will guide the partition
process.dataSet - The original set of data objects to be partitioned.distanceFunction - A distance function
to be used on the partitioning.promoted data objects.mtree.PartitionFunction#process(mtree.utils.Pair, java.util.Set, mtree.DistanceFunction)Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.