Interface ArrayProcessor

All Known Subinterfaces:
ArrayProcessorWithContextSwitching, Convolution, Derivator, IterativeArrayProcessor<T>, Morphology, RankMorphology, ThinningSkeleton
All Known Implementing Classes:
AbstractArrayProcessorWithContextSwitching, AbstractConvolution, AbstractDerivator, AbstractIterativeArrayProcessor, AbstractMorphology, AbstractRankMorphology, BasicConvolution, BasicDerivator, BasicMorphology, BasicRankMorphology, ContinuedConvolution, ContinuedDerivator, ContinuedMorphology, ContinuedRankMorphology, ContinuedStreamingApertureProcessor, ErodingSkeleton, GeneralizedBitProcessing, IterativeErosion, IterativeOpening, OctupleThinningSkeleton2D, Quadruple3x5ThinningSkeleton2D, SkeletonScanner, StreamingApertureProcessor, StrongQuadruple3x5ThinningSkeleton2D, TiledConvolution, TiledMorphology, TiledRankMorphology, WeakOctupleThinningSkeleton2D

public interface ArrayProcessor

Abstract array processor: an algorithm processing AlgART arrays or matrices.

It is very abstract interface: it almost does not declare any functionality. The only exception is the array context. We suppose that any array processing algorithm should work in some context, and this interface declares a method for getting the current execution context (context() method). Usually, the context of execution is passed to constructor or instantiation method.

Some array processors may have no current context. In this situation, context() method returns null. However, we recommend to provide correct context always, because the context allows to show execution progress to the user, interrupt execution and increase performance on multiprocessor systems by multithread execution. Also the context is necessary to specify the memory model used for allocation of AlgART array: by default, most of array processors will use SimpleMemoryModel.

There is an extended version of this interface, ArrayProcessorWithContextSwitching, that also allows to change the current context.

Author:
Daniel Alievsky
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the current context used by this instance for all operations.
  • Method Details

    • context

      ArrayContext context()
      Returns the current context used by this instance for all operations. This method may return null; the classes, implementing this interface, should work in this situation as while using ArrayContext.DEFAULT context.
      Returns:
      the current context used by this instance; may be null.