Class Array2D<T>

    • Constructor Detail

      • Array2D

        public Array2D​(int ySize,
                       int xSize)
    • Method Detail

      • getNDim

        public final int getNDim()
        Description copied from interface: Array
        Gets the number of dimensions of the array. Equal to getShape().length.
        Specified by:
        getNDim in interface Array<T>
      • iterator

        public Iterator<T> iterator()
        Description copied from interface: Array
        Returns an iterator over all the values in the array. The convention is that the last dimension (represented by the last entry in getShape()) varies fastest.
        Specified by:
        iterator in interface Array<T>
        Specified by:
        iterator in interface Iterable<T>
      • set

        public void set​(T value,
                        int... coords)
        Description copied from interface: Array
        Sets a value in the array (optional operation)
        Specified by:
        set in interface Array<T>
      • size

        public long size()
        Description copied from interface: Array
        Gets the number of values in the array.
        Specified by:
        size in interface Array<T>
      • getShape

        public int[] getShape()
        Description copied from interface: Array
        Gets the shape of the array, i.e. the number of points in each direction.
        Specified by:
        getShape in interface Array<T>
      • getXSize

        public int getXSize()
        Convenience method to get the size in the x-direction
      • getYSize

        public int getYSize()
        Convenience method to get the size in the y-direction
      • getXIndex

        public int getXIndex()
        Returns:
        The index used for x values
      • getYIndex

        public int getYIndex()
        Returns:
        The index used for y values