Package net.algart.arrays
Enum Class Matrices.InterpolationMethod
- All Implemented Interfaces:
Serializable
,Comparable<Matrices.InterpolationMethod>
,Constable
- Enclosing class:
Matrices
Interpolation method for representing AlgART matrix as a mathematical
function
.
Used by Matrices.asInterpolationFunc(Matrix, InterpolationMethod, boolean)
and
Matrices.asInterpolationFunc(Matrix, InterpolationMethod, double)
methods.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPolylinear interpolation method: the function value is calculated as a polylinear interpolation of 2n neighbour matrix elements.Simplest interpolation method: the real coordinates are truncated to integer numbers by (long)x Java operator. -
Method Summary
Modifier and TypeMethodDescriptionReturns the dependence range of this interpolation algorithm for all coordinates.static Matrices.InterpolationMethod
Returns the enum constant of this class with the specified name.static Matrices.InterpolationMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STEP_FUNCTION
Simplest interpolation method: the real coordinates are truncated to integer numbers by (long)x Java operator. See details in comments toMatrices.asInterpolationFunc(Matrix, InterpolationMethod, boolean)
. -
POLYLINEAR_FUNCTION
Polylinear interpolation method: the function value is calculated as a polylinear interpolation of 2n neighbour matrix elements. See details in comments toMatrices.asInterpolationFunc(Matrix, InterpolationMethod, boolean)
.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
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:
This method allows to get the dependence range for this interpolation algorithm. In particular, for the(long)x0 + min <= i0 <= (long)x0 + max, (long)x1 + min <= i1 <= (long)x1 + max, ...
STEP_FUNCTION
, representing some matrix, the returned range is always 0..0 (IRange.valueOf(0, 0)
). For the case ofPOLYLINEAR_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.
-