messif.buckets.split.impl
Class SplitPolicyVoronoiPartitioning

java.lang.Object
  extended by messif.buckets.split.SplitPolicy
      extended by messif.buckets.split.impl.SplitPolicyVoronoiPartitioning
All Implemented Interfaces:
ObjectMatcher<LocalAbstractObject>

public class SplitPolicyVoronoiPartitioning
extends SplitPolicy

This class implements Voronoi-like partitioning policy.


Nested Class Summary
 
Nested classes/interfaces inherited from class messif.buckets.split.SplitPolicy
SplitPolicy.ParameterField
 
Field Summary
protected  LocalAbstractObject[] pivots
          Policy parameter pivot
 
Fields inherited from class messif.buckets.split.SplitPolicy
PART_ID_ANY
 
Constructor Summary
SplitPolicyVoronoiPartitioning()
          Creates a new instance of SplitPolicyBallPartitioning
 
Method Summary
 int getPartitionsCount()
          Returns the number of partitions of this policy.
 LocalAbstractObject[] getPivots()
          Returns the array of pivots used for the Voronoi-like partitioning.
 int match(BallRegion region)
          NOT IMPLEMENTED YET!!!!
 int match(LocalAbstractObject object)
          Returns the index of partition to which the object belongs.
 void setPivots(LocalAbstractObject[] pivots)
          Sets the pivots for Voronoi-like partitioning.
 
Methods inherited from class messif.buckets.split.SplitPolicy
getBucketBallRegion, getParameter, getParameterNames, getParameterType, isComplete, isParameterFilled, isParameterLocked, lockParameter, match, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pivots

protected LocalAbstractObject[] pivots
Policy parameter pivot

Constructor Detail

SplitPolicyVoronoiPartitioning

public SplitPolicyVoronoiPartitioning()
Creates a new instance of SplitPolicyBallPartitioning

Method Detail

getPivots

public LocalAbstractObject[] getPivots()
Returns the array of pivots used for the Voronoi-like partitioning.

Returns:
the array of pivots

setPivots

public void setPivots(LocalAbstractObject[] pivots)
Sets the pivots for Voronoi-like partitioning.

Parameters:
pivots - the array of pivots

match

public int match(LocalAbstractObject object)
Returns the index of partition to which the object belongs.

Specified by:
match in interface ObjectMatcher<LocalAbstractObject>
Specified by:
match in class SplitPolicy
Parameters:
object - an object that is tested for partition
Returns:
partition identification (index)

getPartitionsCount

public int getPartitionsCount()
Returns the number of partitions of this policy.

Specified by:
getPartitionsCount in class SplitPolicy
Returns:
the number of partitions of this policy

match

public int match(BallRegion region)
NOT IMPLEMENTED YET!!!! Returns the index of partition to which the whole ball region belongs. Returns -1 if not all objects from the specified ball region fall into just one partition or if this policy cannot decide. In that case, the ball region must be searched one object by one using the match(LocalAbstractObject) method.

Specified by:
match in class SplitPolicy
Parameters:
region - a ball region that is tested for the matching condition
Returns:
the index of partition in which the ball region is contained completely or -1 if it is uncertain