|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.pivotselection.CoveragePivotChooser.Ball
protected class CoveragePivotChooser.Ball
Class encapsulating info about each cluster (ball region).
Field Summary | |
---|---|
protected int |
objects
Number of objects covered by this ball and its neighborhood of size of clusterRadius |
protected LocalAbstractObject |
pivot
Center of the ball |
protected int |
pivotIndex
Index of the center in the precomputed distances cache |
Constructor Summary | |
---|---|
CoveragePivotChooser.Ball(LocalAbstractObject pivot,
int pivotIndex,
CoveragePivotChooser.PrecomputedDistances pd)
Create a new Ball and compute the number of objects covered by the ball and its neighbohood, see objects for more information. |
Method Summary | |
---|---|
int |
compareTo(CoveragePivotChooser.Ball b)
|
int |
getObjects()
Number of objects covered by this ball and its close neighborhood. |
LocalAbstractObject |
getPivot()
Center of this ball. |
int |
getPivotIndex()
Index of the enter of this ball in the precomputed distances cache |
boolean |
intersectsWith(CoveragePivotChooser.Ball b,
CoveragePivotChooser.PrecomputedDistances pd)
Checks if this ball and the passed ball intersect or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final LocalAbstractObject pivot
protected final int pivotIndex
protected int objects
Constructor Detail |
---|
public CoveragePivotChooser.Ball(LocalAbstractObject pivot, int pivotIndex, CoveragePivotChooser.PrecomputedDistances pd)
objects
for more information.
pivot
- object as the cluster (ball) centerpivotIndex
- index of this pivot in precomputed distance cachepd
- cache of precomputed distance used to compute the number of objects covered by the ballMethod Detail |
---|
public int getObjects()
pivot
with the radius set to double value of CoveragePivotChooser.clusterRadius
is used for this computation.
public LocalAbstractObject getPivot()
public int getPivotIndex()
public int compareTo(CoveragePivotChooser.Ball b)
compareTo
in interface java.lang.Comparable<CoveragePivotChooser.Ball>
public boolean intersectsWith(CoveragePivotChooser.Ball b, CoveragePivotChooser.PrecomputedDistances pd)
b
- ball to checkpd
- cache of precomputed distance used to obtain inter-ball-centers' distance
true
if the balls intersect, oterwise false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |