Class LocalizingRealIntervalIterator

    • Field Detail

      • step

        protected final double[] step
      • location

        protected final double[] location
    • Constructor Detail

      • LocalizingRealIntervalIterator

        public LocalizingRealIntervalIterator​(RealInterval interval,
                                              double[] step)
        Iterates an RealInterval with given min and max with the provided step along each dimension.
        Parameters:
        interval - the real interval
        step - iteration step
      • LocalizingRealIntervalIterator

        public LocalizingRealIntervalIterator​(double[] min,
                                              double[] max,
                                              double[] step)
        Iterates an RealInterval with given min and max the the provided step along each dimension.
        Parameters:
        min - real interval min
        max - real interval min
        step - iteration steps
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: Iterator
        Reset the Iterator, that is put it to where it would be if newly created.
        Specified by:
        reset in interface Iterator
      • hasNext

        public boolean hasNext()
        Description copied from interface: Iterator
        Returns true if another step forward is possible.
        Specified by:
        hasNext in interface Iterator
        Returns:
        true, if there is another step forward is possible, otherwise false
      • getFloatPosition

        public float getFloatPosition​(int d)
        Description copied from interface: RealLocalizable
        Return the current position in a given dimension.
        Specified by:
        getFloatPosition in interface RealLocalizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position
      • getDoublePosition

        public double getDoublePosition​(int d)
        Description copied from interface: RealLocalizable
        Return the current position in a given dimension.
        Specified by:
        getDoublePosition in interface RealLocalizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position
      • jumpFwd

        public void jumpFwd​(long steps)
        Description copied from interface: Iterator
        Move steps × forward.

        Highly recommended to override this with a more efficient version.

        Specified by:
        jumpFwd in interface Iterator
        Parameters:
        steps - number of steps to move forward
      • fwd

        public void fwd()
        Description copied from interface: Iterator
        Move forward.
        Specified by:
        fwd in interface Iterator
      • fwdDim

        private void fwdDim​(int d)