Class IntegralCursor<T>

  • All Implemented Interfaces:
    Iterator<T>, Cursor<T>, EuclideanSpace, Iterator, Localizable, RealCursor<T>, RealLocalizable, Sampler<T>

    public class IntegralCursor<T>
    extends AbstractEuclideanSpace
    implements Cursor<T>
    A cursor implementation that returns specific corner values of RectangleNeighborhoods. The cursor returns, for example in 2D, the values at the following positions:
    • (neighMin, neighMin),
    • (neighMax-1, neighMin),
    • (neighMax-1, neighMax-1), and
    • (neighMin, neighMax-1).
    The mechanism naturally extends to nD. The current position can be obtained from getCornerRepresentation() with 0s encoding (neighMin) and 1s encoding (neighMax-1). The iteration order follows the (binary-reflected) Gray code pattern such that only one dimension of the target position is modified per move.
    Author:
    Stefan Helfrich (University of Konstanz)
    See Also:
    http://en.wikipedia.org /wiki/Gray_code