Enum Class Matrices.InterpolationMethod

java.lang.Object
java.lang.Enum<Matrices.InterpolationMethod>
net.algart.arrays.Matrices.InterpolationMethod
All Implemented Interfaces:
Serializable, Comparable<Matrices.InterpolationMethod>, Constable
Enclosing class:
Matrices

public static enum Matrices.InterpolationMethod extends Enum<Matrices.InterpolationMethod>
Interpolation method for representing AlgART matrix as a mathematical function. Used by Matrices.asInterpolationFunc(Matrix, InterpolationMethod, boolean) and Matrices.asInterpolationFunc(Matrix, InterpolationMethod, double) methods.
  • Enum Constant Details

  • Method Details

    • values

      public static Matrices.InterpolationMethod[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Matrices.InterpolationMethod valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • dependenceCoordRange

      public IRange dependenceCoordRange()
      Returns the dependence range of this interpolation algorithm for all coordinates.

      Dependence range is the such range min..max, that the value of the interpolation function f(x0, x1, ...), created by this interpolation method, is fully defined by only the elements of the source matrix with the coordinates i0, i1, ..., lain in the ranges:

       (long)x0 + min <= i0 <= (long)x0 + max,
       (long)x1 + min <= i1 <= (long)x1 + max,
       ...
       
      This method allows to get the dependence range for this interpolation algorithm. In particular, for the STEP_FUNCTION, representing some matrix, the returned range is always 0..0 (IRange.valueOf(0, 0)). For the case of POLYLINEAR_FUNCTION, the range is little larger: 0..1. For more complex interpolation schemes, it could be -1..1, -2..2 and so on.

      In future versions of this package, if this method will not be able to return a suitable range (for example, some value of the returned function depends on all matrix elements), it will return a range, always including all matrix coordinates, for example, Long.MIN_VALUE..Long.MAX_VALUE.

      This method never returns null.

      Returns:
      the dependence range for this interpolation algorithm.