Class AbstractIterativeArrayProcessor<T>

java.lang.Object
net.algart.arrays.AbstractIterativeArrayProcessor<T>
All Implemented Interfaces:
ArrayProcessor, IterativeArrayProcessor<T>
Direct Known Subclasses:
ErodingSkeleton, IterativeErosion, IterativeOpening, OctupleThinningSkeleton2D, Quadruple3x5ThinningSkeleton2D, StrongQuadruple3x5ThinningSkeleton2D, WeakOctupleThinningSkeleton2D

public abstract class AbstractIterativeArrayProcessor<T> extends Object implements IterativeArrayProcessor<T>

A skeletal implementation of the IterativeArrayProcessor interface. Usually, you need to extend this class to implement that interface.

All non-abstract methods are completely implemented here and usually should not be overridden in subclasses.

Author:
Daniel Alievsky
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final ArrayContext
    Current execution context.
    protected final MemoryModel
    The memory model used by this instance for all operations.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates an instance of this class with the given context.
  • Method Summary

    Modifier and Type
    Method
    Description
    chain(IterativeArrayProcessor<T> followingProcessor, double weight)
    Returns new object, implementing this interface, equivalent to the chain of this algorithm and followingProcessor algorithm, executed after this.
    Returns the current context used by this instance for all operations.
    abstract boolean
    Returns true if and only if the algorithm was successfully finished and there is no sense to perform further iterations.
    abstract long
    Estimates the number of iterations, that should be performed from this moment to finish the algorithm.
    abstract void
    If there are some resources, allocated by this object, which are not controlled by Java garbage collectors — files, streams, sockets, locks, etc. — this method tries to release them (for example, to close any files).
    limitIterations(long maxNumberOfIterations)
    Returns new object, implementing this interface, equivalent to this algorithm with the only difference that the number of performed iterations does not exceed the specified argument.
    part(ArrayContext context, double fromPart, double toPart)
    This method returns context == null ? null : context.part(fromPart, toPart)).
    abstract void
    Performs the next iteration of the iterative algorithm.
    Performs a loop of calls of performIteration method, while IterativeArrayProcessor.done() method returns false.
    abstract T
    Returns the result of the previous iteration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait