public class RealPointSampleList<T> extends Object implements IterableRealInterval<T>
real coordinates.| Modifier and Type | Class and Description |
|---|---|
class |
RealPointSampleList.RealPointSampleListCursor |
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<RealPoint> |
coordinates |
protected int |
lastIndex |
protected double[] |
max |
protected double[] |
min |
protected int |
n |
protected ArrayList<T> |
samples |
| Constructor and Description |
|---|
RealPointSampleList(int n) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(RealPoint position,
T sample) |
RealCursor<T> |
cursor()
Returns a
RealCursor that iterates with optimal speed without
calculating the location at each iteration step. |
T |
firstElement()
Get the first element of this
IterableRealInterval. |
Object |
iterationOrder()
Returns the iteration order of this
IterableRealInterval. |
Iterator<T> |
iterator() |
RealCursor<T> |
localizingCursor()
Returns a
RealLocalizable Iterator that calculates its
location at each iteration step. |
int |
numDimensions()
Gets the space's number of dimensions.
|
void |
realMax(double[] m)
Write the maximum of each dimension into double[].
|
double |
realMax(int d)
Get the maximum in dimension d.
|
void |
realMax(RealPositionable m)
Sets a
RealPositionable to the maximum of this Interval |
void |
realMin(double[] m)
Write the minimum of each dimension into double[].
|
double |
realMin(int d)
Get the minimum in dimension d.
|
void |
realMin(RealPositionable m)
Sets a
RealPositionable to the minimum of this Interval |
long |
size()
Returns the number of elements in this
Function. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointforEach, spliteratorprotected final int n
protected int lastIndex
protected final double[] min
protected final double[] max
public RealPointSampleList(int n)
n - - number of dimensionspublic RealCursor<T> cursor()
IterableRealInterval
Returns a RealCursor that iterates with optimal speed without
calculating the location at each iteration step. Localization is
performed on demand.
Use this where localization is required rarely/ not for each iteration.
cursor in interface IterableRealInterval<T>public Object iterationOrder()
IterableRealIntervalIterableRealInterval. If the
returned object equals (Object.equals(Object)) the iteration
order of another IterableRealInterval f then they can be
copied by synchronous iteration. That is, having an Iterator on
this and another Iterator on f, moving both in synchrony
will point both of them to corresponding locations in their source
domain. In other words, this and f have the same iteration order
and means and the same number of elements.iterationOrder in interface IterableRealInterval<T>IterableRealInterval.FlatIterationOrderpublic T firstElement()
IterableRealIntervalIterableRealInterval. This is a
shortcut for cursor().next().
This can be used to create a new variable of type T using
firstElement().createVariable(), which is useful in generic
methods to store temporary results, e.g., a running sum over pixels in
the IterableRealInterval.firstElement in interface IterableRealInterval<T>public RealCursor<T> localizingCursor()
IterableRealInterval
Returns a RealLocalizable Iterator that calculates its
location at each iteration step. That is, localization is performed with
optimal speed.
Use this where localization is required often/ for each iteration.
localizingCursor in interface IterableRealInterval<T>public long size()
IterableRealInterval
Returns the number of elements in this Function.
size in interface IterableRealInterval<T>public double realMax(int d)
RealIntervalrealMax in interface RealIntervald - dimensionpublic void realMax(double[] m)
RealIntervalrealMax in interface RealIntervalpublic void realMax(RealPositionable m)
RealIntervalRealPositionable to the maximum of this IntervalrealMax in interface RealIntervalpublic double realMin(int d)
RealIntervalrealMin in interface RealIntervald - dimensionpublic void realMin(double[] m)
RealIntervalrealMin in interface RealIntervalpublic void realMin(RealPositionable m)
RealIntervalRealPositionable to the minimum of this IntervalrealMin in interface RealIntervalpublic int numDimensions()
EuclideanSpacenumDimensions in interface EuclideanSpaceCopyright © 2015–2022 ImgLib2. All rights reserved.