protected class CoveragePivotChooser.Ball extends java.lang.Object implements java.lang.Comparable<CoveragePivotChooser.Ball>
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
protected final LocalAbstractObject pivot
protected final int pivotIndex
protected int objects
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 ballpublic 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' distancetrue
if the balls intersect, oterwise false
.