|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.buckets.split.SplitPolicy
messif.buckets.split.impl.SplitPolicyMultiWayBallPartitioning
public class SplitPolicyMultiWayBallPartitioning
This class is a multi-way ball-partitioning policy for bucket splitting.
The policy is fully defined by:
LocalAbstractObject
pivot
float[]
list of radii
radii
array incremented by one.
The values of radii define the boundaries between two partitiongs. So, the first partition will
contain objects within this range of distances from pivot: [0,radii[0]]. The second partition will
contain objects within this range of distances from pivot: (radii[0],radii[1]]. Finally, the last
partition will contain objects within this range of distances from pivot: (radii[last],infinity).
The matcher
returns the index of the corresponding partition starting from zero.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class messif.buckets.split.SplitPolicy |
---|
SplitPolicy.ParameterField |
Field Summary | |
---|---|
protected float |
dist
The distance to the pivot computed by the last call to match(Region). |
protected LocalAbstractObject |
pivot
Policy parameter pivot |
protected float[] |
radii
Policy parameter radius |
Fields inherited from class messif.buckets.split.SplitPolicy |
---|
PART_ID_ANY |
Constructor Summary | |
---|---|
SplitPolicyMultiWayBallPartitioning()
Creates a new instance of SplitPolicyBallPartitioning |
Method Summary | |
---|---|
float |
getDistanceToPivot()
Returns the distance to the pivot which might have been computed by the last call to match(Region). |
int |
getPartitionsCount()
Returns the number of partitions of this policy. |
LocalAbstractObject |
getPivot()
Returns the pivot for ball partitioning. |
float[] |
getRadii()
Returns the array of radii used for the multi-way ball partitioning. |
int |
match(BallRegion region)
Returns the index of partition to which the whole ball region belongs. |
int |
match(LocalAbstractObject object)
Returns the index of partition to which the object belongs. |
void |
setPivot(LocalAbstractObject pivot)
Sets the pivot for ball partitioning. |
void |
setRadii(float[] radii)
Sets the radii for multi-way ball 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 |
---|
protected LocalAbstractObject pivot
protected float[] radii
protected float dist
Constructor Detail |
---|
public SplitPolicyMultiWayBallPartitioning()
Method Detail |
---|
public void setPivot(LocalAbstractObject pivot)
pivot
- the pivotpublic LocalAbstractObject getPivot()
public void setRadii(float[] radii)
radii
- the array of radiipublic float[] getRadii()
public float getDistanceToPivot()
LocalAbstractObject.UNKNOWN_DISTANCE
, the distance
was not evaluated.
public int match(LocalAbstractObject object)
object
belongs.
match
in interface ObjectMatcher<LocalAbstractObject>
match
in class SplitPolicy
object
- an object that is tested for partition
public int getPartitionsCount()
getPartitionsCount
in class SplitPolicy
public int match(BallRegion region)
match(LocalAbstractObject)
method.
match
in class SplitPolicy
region
- a ball region that is tested for the matching condition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |