public class NNSRealPointCollection<L extends RealLocalizable> extends AbstractEuclideanSpace implements RealPointCollection<L>
RealPointCollection
which checks if points are in the collection by
performing a NearestNeighborSearch
on the provided
IterableRealInterval
.Modifier and Type | Field and Description |
---|---|
protected IterableRealInterval<L> |
interval |
protected NearestNeighborSearch<L> |
search |
n
Constructor and Description |
---|
NNSRealPointCollection(IterableRealInterval<L> interval)
Creates a
RealPointCollection . |
NNSRealPointCollection(IterableRealInterval<L> interval,
NearestNeighborSearch<L> search)
Creates a
RealPointCollection . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determines whether this point collection describes the same region as
another one.
|
int |
hashCode() |
IterableRealInterval<L> |
points()
Returns the points in the collection.
|
void |
realMax(double[] max)
Write the maximum of each dimension into double[].
|
double |
realMax(int d)
Get the maximum in dimension d.
|
void |
realMax(RealPositionable max)
Sets a
RealPositionable to the maximum of this Interval |
void |
realMin(double[] min)
Write the minimum of each dimension into double[].
|
double |
realMin(int d)
Get the minimum in dimension d.
|
void |
realMin(RealPositionable min)
Sets a
RealPositionable to the minimum of this Interval |
long |
size()
Returns the number of points in the collection.
|
boolean |
test(RealLocalizable l) |
numDimensions
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
boundaryType, equals, hashCode, maskType
and, isEmpty, minus, or, transform, xor
isAll, knownConstant
numDimensions
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
protected IterableRealInterval<L extends RealLocalizable> interval
protected NearestNeighborSearch<L extends RealLocalizable> search
public NNSRealPointCollection(IterableRealInterval<L> interval)
RealPointCollection
.interval
- Contains the points which will be included in this collection.
This will be used to create a
NearestNeighborSearchOnIterableRealInterval
.The first
point determines the dimensionality of the collection.public NNSRealPointCollection(IterableRealInterval<L> interval, NearestNeighborSearch<L> search)
RealPointCollection
.interval
- Contains the points which will be included in this collection.
This will be used to create a
NearestNeighborSearchOnIterableRealInterval
. The first
point determines the dimensionality of the collection.search
- Will be used to check if a point is contained by the
collection.public boolean test(RealLocalizable l)
test
in interface Predicate<RealLocalizable>
public double realMin(int d)
RealInterval
realMin
in interface RealInterval
d
- dimensionpublic void realMin(double[] min)
RealInterval
realMin
in interface RealInterval
realMin
in interface RealMaskRealInterval
public void realMin(RealPositionable min)
RealInterval
RealPositionable
to the minimum of this Interval
realMin
in interface RealInterval
realMin
in interface RealMaskRealInterval
public double realMax(int d)
RealInterval
realMax
in interface RealInterval
d
- dimensionpublic void realMax(double[] max)
RealInterval
realMax
in interface RealInterval
realMax
in interface RealMaskRealInterval
public void realMax(RealPositionable max)
RealInterval
RealPositionable
to the maximum of this Interval
realMax
in interface RealInterval
realMax
in interface RealMaskRealInterval
public IterableRealInterval<L> points()
RealPointCollection
points
in interface RealPointCollection<L extends RealLocalizable>
public long size()
RealPointCollection
size
in interface RealPointCollection<L extends RealLocalizable>
public boolean equals(Object obj)
RealPointCollection
equals
in interface RealPointCollection<L extends RealLocalizable>
equals
in interface MaskPredicate<RealLocalizable>
equals
in class Object
obj
- The point collection to compare with this one.MaskPredicate.equals(Object)
,
RealPointCollection.equals(RealPointCollection, RealPointCollection)
Copyright © 2015–2022 ImgLib2. All rights reserved.