Class AbstractNDArrayPermuteDimsView<T,​T2 extends Number>

    • Method Detail

      • getDimsOrder

        public int[] getDimsOrder()
      • mapOnSlices

        public NDArray<T> mapOnSlices​(BiFunction<NDArray<T>,​int[],​NDArray<?>> func,
                                      int... iterationDims)
        Description copied from interface: NDArray
        Apply the given function to each slices of the array, and create a new NDArray with the calculated new values. Please note that slices might not be processed in a sequential order!
        Specified by:
        mapOnSlices in interface NDArray<T>
        Overrides:
        mapOnSlices in class AbstractNDArray<T,​T2 extends Number>
        Parameters:
        func - function that receives slice and its Cartesian coordinate along the iteration dimensions, and returns a new array with the same size as the slice
        iterationDims - dimensions along which iteration is performed
        Returns:
        the new NDArray with the calculated new values
      • applyOnSlices

        public NDArray<T> applyOnSlices​(BiFunction<NDArray<T>,​int[],​NDArray<?>> func,
                                        int... iterationDims)
        Description copied from interface: NDArray
        Apply the given function to each slices of the array, and override each entry with the returned slice. Please note that slices might not be processed in a sequential order!
        Specified by:
        applyOnSlices in interface NDArray<T>
        Overrides:
        applyOnSlices in class AbstractNDArray<T,​T2 extends Number>
        Parameters:
        func - function that receives the value of the current entry and its Cartesian coordinate, and returns a slice from which values are copied to original array
        iterationDims - dimensions along which iteration is performed
        Returns:
        itself after the update
      • equals

        public boolean equals​(Object obj)
        Description copied from interface: NDArray
        Compares the specified object with this NDArray for equality. Two arrays are equal, if they are both real or both complex, and they are element-wise equal. If the specified object is not NDArray then the function returns false.
        Specified by:
        equals in interface NDArray<T>
        Overrides:
        equals in class AbstractNDArrayView<T,​T2 extends Number>
        Parameters:
        obj - Object to be compared for equality
        Returns:
        true if the specified object equals with this NDArray
      • hashCode

        public int hashCode()
        Description copied from interface: NDArray
        This method is unsupported because NDArrays should not be used as keys in hash-based collections.
        Specified by:
        hashCode in interface NDArray<T>
        Overrides:
        hashCode in class AbstractNDArrayView<T,​T2 extends Number>
        Returns:
        always throws UnsupportedOperationsException