|
||||||||||
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.SplitPolicyGeneralizedHyperplane
public class SplitPolicyGeneralizedHyperplane
This class defines a policy for bucket splitting based on the generalized hyperplane partitioning. The objects are split according to two pivots - object closer to the left pivot stays while the one closer to the right pivot moves.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class messif.buckets.split.SplitPolicy |
---|
SplitPolicy.ParameterField |
Field Summary | |
---|---|
protected float |
halfPivotDistance
The distance between the pivots divided by two. |
protected float |
leftDist
The distance to the left pivot computed by the last call to match(Region). |
protected LocalAbstractObject |
leftPivot
Policy parameter left pivot |
static int |
PART_ID_LEFT
Identification of the left partition. |
static int |
PART_ID_RIGHT
Identification of the right partition. |
protected float |
rightDist
The distance to the right pivot computed by the last call to match(Region). |
protected LocalAbstractObject |
rightPivot
Policy parameter right pivot |
Fields inherited from class messif.buckets.split.SplitPolicy |
---|
PART_ID_ANY |
Constructor Summary | |
---|---|
SplitPolicyGeneralizedHyperplane()
Creates a new instance of SplitPolicyBallPartitioning |
Method Summary | |
---|---|
float |
getDistanceToLeftPivot()
Returns the distance to the left pivot which might have been computed by the last call to match(Region). |
float |
getDistanceToRightPivot()
Returns the distance to the right pivot which might have been computed by the last call to match(Region). |
LocalAbstractObject |
getLeftPivot()
Returns the first pivot for generalized hyperplane partitioning. |
int |
getPartitionsCount()
Returns the number of partitions of this policy. |
LocalAbstractObject |
getRightPivot()
Returns the second pivot for generalized hyperplane partitioning. |
int |
match(BallRegion region)
Returns the group (partition) to which the whole ball region belongs. |
int |
match(LocalAbstractObject object)
Returns 0 for objects near the left pivot defined by this policy (or exactly in the middle) and 1 for objects near the right pivot. |
void |
setLeftPivot(LocalAbstractObject leftPivot)
Sets the first pivot for generalized hyperplane partitioning. |
void |
setParameter(java.lang.String parameter,
java.lang.Object value)
Use this method to set the policy parameter. |
void |
setRightPivot(LocalAbstractObject rightPivot)
Sets the second pivot for generalized hyperplane partitioning. |
Methods inherited from class messif.buckets.split.SplitPolicy |
---|
getBucketBallRegion, getParameter, getParameterNames, getParameterType, isComplete, isParameterFilled, isParameterLocked, lockParameter, match |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LocalAbstractObject leftPivot
protected LocalAbstractObject rightPivot
protected float halfPivotDistance
LocalAbstractObject.UNKNOWN_DISTANCE
is held.
protected float leftDist
protected float rightDist
public static final int PART_ID_LEFT
0
public static final int PART_ID_RIGHT
1
Constructor Detail |
---|
public SplitPolicyGeneralizedHyperplane()
Method Detail |
---|
public void setLeftPivot(LocalAbstractObject leftPivot)
leftPivot
- the pivotpublic LocalAbstractObject getLeftPivot()
public void setRightPivot(LocalAbstractObject rightPivot)
rightPivot
- the pivotpublic LocalAbstractObject getRightPivot()
public void setParameter(java.lang.String parameter, java.lang.Object value) throws java.lang.IllegalStateException, java.util.NoSuchElementException, java.lang.NullPointerException
setParameter
in class SplitPolicy
parameter
- the name of the policy parametervalue
- new value for the parameter
java.lang.IllegalStateException
- if the specified parameter is locked
java.util.NoSuchElementException
- if there is no parameter for the specified name
java.lang.NullPointerException
- if the specified value is nullpublic float getDistanceToLeftPivot()
LocalAbstractObject.UNKNOWN_DISTANCE
, the distance
was not evaluated.
public float getDistanceToRightPivot()
LocalAbstractObject.UNKNOWN_DISTANCE
, the distance
was not evaluated.
public int match(LocalAbstractObject object)
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(messif.objects.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 |