Class BalancedPartitionFunction<T>
java.lang.Object
kieker.analysis.generic.clustering.mtree.BalancedPartitionFunction<T>
- Type Parameters:
T
- The type of the data objects.
- All Implemented Interfaces:
IPartitionFunction<T>
public final class BalancedPartitionFunction<T> extends java.lang.Object implements IPartitionFunction<T>
A partition function that tries to
distribute the data objects equally between the promoted data objects,
associating to each promoted data objects the nearest data objects.
- Since:
- 2.0.0
- Author:
- Eduardo R. D'Avila
-
Constructor Summary
Constructors Constructor Description BalancedPartitionFunction()
-
Method Summary
-
Constructor Details
-
BalancedPartitionFunction
public BalancedPartitionFunction()
-
-
Method Details
-
process
public Pair<java.util.Set<T>> process(Pair<T> promoted, java.util.Set<T> dataSet, IDistanceFunction<? super T> distanceFunction)Processes the balanced partition.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
- Specified by:
process
in interfaceIPartitionFunction<T>
- Parameters:
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.- Returns:
- A pair of partition sub-sets. Each sub-set must correspond to one
of the
promoted
data objects. - See Also:
mtree.IPartitionFunction#process(mtree.utils.Pair, java.util.Set, mtree.IDistanceFunction)
-