Package net.algart.arrays
Class Matrices.ResizingMethod
java.lang.Object
net.algart.arrays.Matrices.ResizingMethod
- Direct Known Subclasses:
Matrices.ResizingMethod.Averaging
- Enclosing class:
Matrices
Resizing mode for Matrices.asResized
method.
This class is immutable and thread-safe: there are no ways to modify settings of the created instance.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Resizing method with averaging (while compression). -
Field Summary
Modifier and TypeFieldDescriptionstatic final Matrices.ResizingMethod.Averaging
Resizing with averaging (while compression), but without interpolation.static final Matrices.ResizingMethod.Averaging
Resizing with polylinear interpolation and averaging while compression.static final Matrices.ResizingMethod
Resizing with polylinear interpolation (useful for expanding), but without interpolation.static final Matrices.ResizingMethod
Simplest resizing method. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true for any instances ofMatrices.ResizingMethod.Averaging
class, in particular, forAVERAGING
andPOLYLINEAR_AVERAGING
cases, false for other cases.final boolean
Returns true forPOLYLINEAR_INTERPOLATION
andPOLYLINEAR_AVERAGING
cases, and for inheritors ofMatrices.ResizingMethod.Averaging
class created withMatrices.InterpolationMethod.POLYLINEAR_FUNCTION
constructor argument, false for other cases.ReturnsMatrices.InterpolationMethod.POLYLINEAR_FUNCTION
forPOLYLINEAR_INTERPOLATION
andPOLYLINEAR_AVERAGING
cases,Matrices.InterpolationMethod.STEP_FUNCTION
forSIMPLE
andAVERAGING
cases, and the argument of the constructor for inheritors ofMatrices.ResizingMethod.Averaging
class.
-
Field Details
-
SIMPLE
Simplest resizing method. See details in comments toMatrices.asResized
. -
AVERAGING
Resizing with averaging (while compression), but without interpolation. See details in comments toMatrices.asResized
. -
POLYLINEAR_INTERPOLATION
Resizing with polylinear interpolation (useful for expanding), but without interpolation. See details in comments toMatrices.asResized
. -
POLYLINEAR_AVERAGING
Resizing with polylinear interpolation and averaging while compression. See details in comments toMatrices.asResized
.
-
-
Method Details
-
averaging
public boolean averaging()Returns true for any instances ofMatrices.ResizingMethod.Averaging
class, in particular, forAVERAGING
andPOLYLINEAR_AVERAGING
cases, false for other cases.- Returns:
- whether this mode performs averaging of several elements.
-
interpolation
public final boolean interpolation()Returns true forPOLYLINEAR_INTERPOLATION
andPOLYLINEAR_AVERAGING
cases, and for inheritors ofMatrices.ResizingMethod.Averaging
class created withMatrices.InterpolationMethod.POLYLINEAR_FUNCTION
constructor argument, false for other cases.- Returns:
- whether this mode performs some form of interpolation between elements.
-
interpolationMethod
ReturnsMatrices.InterpolationMethod.POLYLINEAR_FUNCTION
forPOLYLINEAR_INTERPOLATION
andPOLYLINEAR_AVERAGING
cases,Matrices.InterpolationMethod.STEP_FUNCTION
forSIMPLE
andAVERAGING
cases, and the argument of the constructor for inheritors ofMatrices.ResizingMethod.Averaging
class.- Returns:
- the interpolation method used while resizing.
-