Documentation of 'mikera.arrayz.impl.BaseShapedArray' Java class
BaseShapedArray
mikera.arrayz.impl

Class BaseShapedArray

    • Constructor Detail

      • BaseShapedArray

        public BaseShapedArray(int[] shape)
    • Method Detail

      • dimensionality

        public int dimensionality()
        Description copied from interface: INDArray
        Returns the dimensionality of the array (i.e. the number of dimensions in the array shape) e.g. 0 for a scalar, 1 for a vector, 2 for a matrix etc.
      • getShape

        public int[] getShape()
        Description copied from interface: INDArray
        Returns the shape of the array as an array of ints. WARNING: May return the internal int[] array describing the shape. Modifying this may cause undefined behaviour. If you want to guarantee a new int[] array that can be safely modified, use getShapeClone() instead
      • getShapeClone

        public int[] getShapeClone()
        Description copied from interface: INDArray
        Returns the shape of the array as an array of ints, guaranteed to be a new array i.e. will perform a defensive copy of any internal shape array if required.
        Specified by:
        getShapeClone in interface INDArray
        Overrides:
        getShapeClone in class AbstractArray<INDArray>
      • sliceCount

        public int sliceCount()
        Description copied from interface: INDArray
        Returns the number of major slices in this array (i.e. the size of dimension 0)
      • reduce

        public double reduce(Op2 op,
                             double init)
        Description copied from interface: INDArray
        Reduces over all elements of the array in row-major order. Applies the operator to the initial/previous result at each step. Returns the final result.
        Specified by:
        reduce in interface INDArray
        Overrides:
        reduce in class AbstractArray<INDArray>
      • reduce

        public double reduce(Op2 op)
        Description copied from interface: INDArray
        Reduces over all elements of the array in row-major order. Applies the operator to the previous result at each step. Returns the final result.
        Specified by:
        reduce in interface INDArray
        Overrides:
        reduce in class AbstractArray<INDArray>
      • elementCount

        public long elementCount()
        Description copied from interface: INDArray
        Returns the total number of elements in this array. Equivalent to the product of all dimension sizes.
      • getElement

        public double getElement(long i)
        Description copied from interface: INDArray
        Gets a specific element of this array, indexed in row-major order
        Returns:
        The element value

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.