Class AbstractDerivator
java.lang.Object
net.algart.arrays.AbstractArrayProcessorWithContextSwitching
net.algart.matrices.linearfiltering.AbstractDerivator
- All Implemented Interfaces:
Cloneable
,ArrayProcessor
,ArrayProcessorWithContextSwitching
,Derivator
- Direct Known Subclasses:
BasicDerivator
public abstract class AbstractDerivator
extends AbstractArrayProcessorWithContextSwitching
implements Derivator
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.algart.matrices.linearfiltering.Derivator
Derivator.SuppressionMode
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDerivator
(ArrayContext context, boolean decrementForUnsigned) Creates an instance of this class with the given context. -
Method Summary
Modifier and TypeMethodDescriptionasMaskOfMaximums
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) asMaskOfMinimums
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) asMaximumFromShiftedForwardAndBackward
(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) asMinimumFromShiftedForwardAndBackward
(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) asModuleOfVector
(Class<? extends T> requiredType, List<? extends Matrix<? extends PArray>> vectorComponents) asNonMaximumSuppression
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) asNonMinimumSuppression
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) Matrix<? extends PIntegerArray>
asRoundedDirectionIndex2D
(Matrix<? extends PArray> vectorX, Matrix<? extends PArray> vectorY) protected static IPoint[]
checkAndCloneDirections
(int dimCount, IPoint... directions) context
(ArrayContext newContext) This method is implemented here via cloning this object (by standard clone() call) and replacing the value of the field, where a reference to the current context is stored, with newContext value.double
abstract boolean
Matrix<? extends UpdatableBitArray>
maskOfMaximums
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) void
maskOfMaximums
(Matrix<? extends UpdatableBitArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) Matrix<? extends UpdatableBitArray>
maskOfMinimums
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) void
maskOfMinimums
(Matrix<? extends UpdatableBitArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) Matrix<? extends UpdatablePArray>
maximumFromShiftedForwardAndBackward
(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) void
maximumFromShiftedForwardAndBackward
(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) Matrix<? extends UpdatablePArray>
minimumFromShiftedForwardAndBackward
(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) void
minimumFromShiftedForwardAndBackward
(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) Matrix<? extends UpdatablePArray>
nonMaximumSuppression
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) void
nonMaximumSuppression
(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) Matrix<? extends UpdatablePArray>
nonMinimumSuppression
(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) void
nonMinimumSuppression
(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) IPoint[]
Methods inherited from class net.algart.arrays.AbstractArrayProcessorWithContextSwitching
context, contextPart, memoryModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.algart.arrays.ArrayProcessor
context
-
Field Details
-
decrementForUnsigned
protected final boolean decrementForUnsigned
-
-
Constructor Details
-
AbstractDerivator
Creates an instance of this class with the given context.- Parameters:
context
- the context used by this instance for all operations.decrementForUnsigned
- if true, when the type of the arguments of some methods is an unsigned number in terms of AlgART libraries — byte, short, char — it is automatically decremented by 128 (byte) or 32768 (short and char).
-
-
Method Details
-
context
Description copied from class:AbstractArrayProcessorWithContextSwitching
This method is implemented here via cloning this object (by standard clone() call) and replacing the value of the field, where a reference to the current context is stored, with newContext value. This technique is suitable for most implementation. However, if you need, you can override this method; maybe, it is enough to override clone() instead.
- Specified by:
context
in interfaceArrayProcessorWithContextSwitching
- Specified by:
context
in interfaceDerivator
- Overrides:
context
in classAbstractArrayProcessorWithContextSwitching
- Parameters:
newContext
- another context, used by the returned instance; may be null.- Returns:
- new instance with another context.
-
isPseudoCyclic
public abstract boolean isPseudoCyclic()- Specified by:
isPseudoCyclic
in interfaceDerivator
-
decrement
-
asMaximumFromShiftedForwardAndBackward
public abstract Matrix<? extends PArray> asMaximumFromShiftedForwardAndBackward(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
asMaximumFromShiftedForwardAndBackward
in interfaceDerivator
-
maximumFromShiftedForwardAndBackward
public Matrix<? extends UpdatablePArray> maximumFromShiftedForwardAndBackward(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
maximumFromShiftedForwardAndBackward
in interfaceDerivator
-
maximumFromShiftedForwardAndBackward
public void maximumFromShiftedForwardAndBackward(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
maximumFromShiftedForwardAndBackward
in interfaceDerivator
-
asMaskOfMaximums
public abstract Matrix<? extends BitArray> asMaskOfMaximums(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
asMaskOfMaximums
in interfaceDerivator
-
maskOfMaximums
public Matrix<? extends UpdatableBitArray> maskOfMaximums(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
maskOfMaximums
in interfaceDerivator
-
maskOfMaximums
public void maskOfMaximums(Matrix<? extends UpdatableBitArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
maskOfMaximums
in interfaceDerivator
-
asNonMaximumSuppression
public abstract Matrix<? extends PArray> asNonMaximumSuppression(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
asNonMaximumSuppression
in interfaceDerivator
-
nonMaximumSuppression
public Matrix<? extends UpdatablePArray> nonMaximumSuppression(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
nonMaximumSuppression
in interfaceDerivator
-
nonMaximumSuppression
public void nonMaximumSuppression(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
nonMaximumSuppression
in interfaceDerivator
-
asMinimumFromShiftedForwardAndBackward
public abstract Matrix<? extends PArray> asMinimumFromShiftedForwardAndBackward(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
asMinimumFromShiftedForwardAndBackward
in interfaceDerivator
-
minimumFromShiftedForwardAndBackward
public Matrix<? extends UpdatablePArray> minimumFromShiftedForwardAndBackward(Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
minimumFromShiftedForwardAndBackward
in interfaceDerivator
-
minimumFromShiftedForwardAndBackward
public void minimumFromShiftedForwardAndBackward(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
minimumFromShiftedForwardAndBackward
in interfaceDerivator
-
asMaskOfMinimums
public abstract Matrix<? extends BitArray> asMaskOfMinimums(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
asMaskOfMinimums
in interfaceDerivator
-
maskOfMinimums
public Matrix<? extends UpdatableBitArray> maskOfMinimums(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
maskOfMinimums
in interfaceDerivator
-
maskOfMinimums
public void maskOfMinimums(Matrix<? extends UpdatableBitArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
maskOfMinimums
in interfaceDerivator
-
asNonMinimumSuppression
public abstract Matrix<? extends PArray> asNonMinimumSuppression(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
asNonMinimumSuppression
in interfaceDerivator
-
nonMinimumSuppression
public Matrix<? extends UpdatablePArray> nonMinimumSuppression(Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
nonMinimumSuppression
in interfaceDerivator
-
nonMinimumSuppression
public void nonMinimumSuppression(Matrix<? extends UpdatablePArray> dest, Matrix<? extends PArray> src, Derivator.SuppressionMode mode, double filler, Matrix<? extends PIntegerArray> directionIndexes, IPoint... directions) - Specified by:
nonMinimumSuppression
in interfaceDerivator
-
asRoundedDirectionIndex2D
public Matrix<? extends PIntegerArray> asRoundedDirectionIndex2D(Matrix<? extends PArray> vectorX, Matrix<? extends PArray> vectorY) - Specified by:
asRoundedDirectionIndex2D
in interfaceDerivator
-
roundedDirections2D
- Specified by:
roundedDirections2D
in interfaceDerivator
-
asModuleOfVector
public <T extends PArray> Matrix<T> asModuleOfVector(Class<? extends T> requiredType, List<? extends Matrix<? extends PArray>> vectorComponents) - Specified by:
asModuleOfVector
in interfaceDerivator
-
checkAndCloneDirections
-