Class FinalInterval

All Implemented Interfaces:
Dimensions, EuclideanSpace, Interval, RealInterval

public final class FinalInterval extends AbstractInterval
Implementation of the Interval interface.
  • Constructor Details

    • FinalInterval

      public FinalInterval(Interval interval)
      Creates an Interval from another Interval
      Parameters:
      interval - another Interval
    • FinalInterval

      public FinalInterval(Dimensions dimensions)
      Creates an Interval with the boundaries [0, dimensions-1]
      Parameters:
      dimensions - the size of the interval
    • FinalInterval

      protected FinalInterval(long[] min, long[] max, boolean copy)
      Creates an Interval with the boundaries [min, max] (both including)
      Parameters:
      min - the position of the first elements in each dimension
      max - the position of the last elements in each dimension
      copy - flag indicating whether min and max arrays should be duplicated.
    • FinalInterval

      public FinalInterval(long[] min, long[] max)
      Creates an Interval with the boundaries [min, max] (both including)
      Parameters:
      min - the position of the first elements in each dimension
      max - the position of the last elements in each dimension
    • FinalInterval

      public FinalInterval(Localizable min, Localizable max)
      Creates an Interval with the boundaries [min, max] (both including)
      Parameters:
      min - the position of the first elements in each dimension
      max - the position of the last elements in each dimension
    • FinalInterval

      public FinalInterval(long... dimensions)
      Creates an Interval with the boundaries [0, dimensions-1]
      Parameters:
      dimensions - the size of the interval
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createMinSize

      public static FinalInterval createMinSize(long... minsize)
      Create a FinalInterval from a parameter list comprising minimum coordinates and size. For example, to create a 2D interval from (10, 10) to (20, 40) use createMinSize( 10, 10, 11, 31 ).
      Parameters:
      minsize - a list of 2*n parameters to create a n -dimensional interval. The first n parameters specify the minimum of the interval, the next n parameters specify the dimensions of the interval.
      Returns:
      interval with the specified boundaries
    • createMinMax

      public static FinalInterval createMinMax(long... minmax)
      Create a FinalInterval from a parameter list comprising minimum and maximum coordinates. For example, to create a 2D interval from (10, 10) to (20, 40) use createMinMax( 10, 10, 20, 40 ).
      Parameters:
      minmax - a list of 2*n parameters to create a n -dimensional interval. The first n parameters specify the minimum of the interval, the next n parameters specify the maximum of the interval.
      Returns:
      interval with the specified boundaries
    • createMinSize

      public static FinalInterval createMinSize(long[] min, long[] size)
      Create an Interval with the given minimum coordinates and size.
      Parameters:
      min - the minimum of the interval
      size - the dimensions of the interval
      Returns:
      interval with the specified boundaries
    • wrap

      public static FinalInterval wrap(long[] min, long[] max)
      Create an Interval that stores its min and max in the provided arrays.
      Parameters:
      min - array for storing the position of the first elements in each dimension
      max - array for storing the the position of the last elements in each dimension