Interface Interval

All Superinterfaces:
Dimensions, EuclideanSpace, RealInterval
All Known Subinterfaces:
Img<T>, IterableInterval<T>, NativeImg<T,A>, RandomAccessibleInterval<T>, SubIntervalIterable<T>
All Known Implementing Classes:
AbstractCellImg, AbstractConvertedIterableInterval, AbstractConvertedIterableRandomAccessibleInterval, AbstractConvertedRandomAccessibleInterval, AbstractImg, AbstractInterval, AbstractListImg, AbstractLongListImg, AbstractNativeImg, AbstractWrappedInterval, ARGBScreenImage, ArrayImg, ArrayImgAWTScreenImage, BiConvertedIterableInterval, BiConvertedRandomAccessibleInterval, ByteAWTScreenImage, Cell, CellGrid.CellIntervals, CellImg, CompositeIntervalView, ConvertedIterableInterval, ConvertedRandomAccessibleInterval, DiscreteFrequencyDistribution, DoubleAWTScreenImage, FinalInterval, FloatAWTScreenImage, Grid.CellIntervals, Histogram1d, HistogramNd, ImgView, IntAWTScreenImage, IntervalIterator, IntervalView, IterableRandomAccessibleInterval, IterableTransformBuilder.IterableIntervalView, IterableTransformBuilder.Slice, IterableTransformBuilder.SubInterval, LazyCellImg, LazyCellImg.LazyCells, ListImg, LocalizingIntervalIterator, LocalizingZeroMinIntervalIterator, NtreeCursor, NtreeImg, OffsetableIntervalIterator, OffsetableLocalizingIntervalIterator, PlanarImg, PointSampleList, RandomAccessibleIntervalCursor, ShortAWTScreenImage, StackView, SubsampleIntervalView, UnsignedByteAWTScreenImage, UnsignedIntAWTScreenImage, UnsignedShortAWTScreenImage, WriteConvertedIterableInterval, WriteConvertedIterableRandomAccessibleInterval, WriteConvertedRandomAccessibleInterval, ZeroMinIntervalIterator

public interface Interval extends RealInterval, Dimensions

{x∈Zn|mindxdmaxd;d∈{0… n-1}}

An Interval over the discrete source domain. Note that this does not imply that for all coordinates in the Interval function values exist or can be generated. It only defines where the minimum and maximum source coordinates are. E.g. an IterableInterval has a limited number of values and a source coordinate for each. By that, minimum and maximum are defined but the Interval does not define a value for all coordinates in between.

  • Method Details

    • min

      long min(int d)
      Get the minimum in dimension d.
      Parameters:
      d - dimension
      Returns:
      minimum in dimension d.
    • min

      default void min(long[] min)
      Write the minimum of each dimension into long[].
      Parameters:
      min -
    • min

      default void min(Positionable min)
      Sets a Positionable to the minimum of this Interval
      Parameters:
      min -
    • max

      long max(int d)
      Get the maximum in dimension d.
      Parameters:
      d - dimension
      Returns:
      maximum in dimension d.
    • max

      default void max(long[] max)
      Write the maximum of each dimension into long[].
      Parameters:
      max -
    • max

      default void max(Positionable max)
      Sets a Positionable to the maximum of this Interval
      Parameters:
      max -
    • realMin

      default double realMin(int d)
      Default implementation of RealInterval.realMin(int).
      Specified by:
      realMin in interface RealInterval
      Parameters:
      d - dimension
      Returns:
      minimum in dimension d.
    • realMax

      default double realMax(int d)
      Default implementation of RealInterval.realMax(int).
      Specified by:
      realMax in interface RealInterval
      Parameters:
      d - dimension
      Returns:
      maximum in dimension d.
    • dimension

      default long dimension(int d)
      Default implementation of Dimensions.dimension(int).
      Specified by:
      dimension in interface Dimensions
      Parameters:
      d -
    • minAsLongArray

      default long[] minAsLongArray()
      Allocates a new long array with the minimum of this Interval. Please note that his method allocates a new array each time which introduces notable overhead in both compute and memory. If you query it frequently, you should allocate a dedicated array first and reuse it with min(long[]).
      Returns:
      the min
    • minAsPoint

      default Point minAsPoint()
      Allocates a new Point with the maximum of this Interval. Please note that his method allocates a new Point each time which introduces notable overhead in both compute and memory. If you query it frequently, you should allocate a dedicated Point first and reuse it with min(Positionable).
      Returns:
      the min
    • maxAsLongArray

      default long[] maxAsLongArray()
      Allocates a new long array with the maximum of this Interval. Please note that his method allocates a new array each time which introduces notable overhead in both compute and memory. If you query it frequently, you should allocate a dedicated array first and reuse it with max(long[]).
      Returns:
      the max
    • maxAsPoint

      default Point maxAsPoint()
      Allocates a new Point with the maximum of this Interval. Please note that his method allocates a new Point each time which introduces notable overhead in both compute and memory. If you query it frequently, you should allocate a dedicated Point first and reuse it with max(Positionable).
      Returns:
      the max