Documentation of 'pl.edu.icm.jlargearrays.LargeArrayUtils' Java class
LargeArrayUtils
pl.edu.icm.jlargearrays

Class LargeArrayUtils



  • public class LargeArrayUtils
    extends java.lang.Object
    LargeArray utilities.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static sun.misc.Unsafe UNSAFE
      An object for performing low-level, unsafe operations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void arraycopy(java.lang.Object src, long srcPos, java.lang.Object dest, long destPos, long length)
      Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
      static LargeArray convert(LargeArray src, LargeArrayType type)
      Converts LargeArray to a given type.
      static LargeArray create(LargeArrayType type, long length)
      Creates a new instance of LargeArray.
      static LargeArray create(LargeArrayType type, long length, boolean zeroNativeMemory)
      Creates a new instance of LargeArray
      static LargeArray createConstant(LargeArrayType type, long length, java.lang.Object value)
      Creates a new constant LargeArray.
      static LargeArray generateRandom(LargeArrayType type, long length)
      Generates a random LargeArray
      static LargeArray select(LargeArray src, LogicLargeArray mask)
      Returns all elements of the specified source array for which the corresponding mask element is equal to 1.
      static void subarraycopy(java.lang.Object src, int[] srcDim, int[] srcPos, java.lang.Object dest, int[] destDim, int[] destPos, int[] size)
      Copies a rectangular area of rank 1 to 4 from source to target.
      static void subarraycopy(java.lang.Object src, long[] srcDim, long[] srcPos, java.lang.Object dest, long[] destDim, long[] destPos, long[] size)
      Copies a rectangular area of rank 1 to 4 from source to target.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNSAFE

        public static final sun.misc.Unsafe UNSAFE
        An object for performing low-level, unsafe operations.
    • Method Detail

      • arraycopy

        public static void arraycopy(java.lang.Object src,
                                     long srcPos,
                                     java.lang.Object dest,
                                     long destPos,
                                     long length)
        Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. Both arrays need to be of the same type. Array bounds are checked.
        Parameters:
        src - the source array.
        srcPos - starting position in the source array.
        dest - the destination array.
        destPos - starting position in the destination data.
        length - the number of array elements to be copied.
      • subarraycopy

        public static void subarraycopy(java.lang.Object src,
                                        long[] srcDim,
                                        long[] srcPos,
                                        java.lang.Object dest,
                                        long[] destDim,
                                        long[] destPos,
                                        long[] size)
        Copies a rectangular area of rank 1 to 4 from source to target.
        Parameters:
        src - source array of the length srcDim[0] * srcDim[1] * ... * srcDim[srcDim.length-1]
        srcDim - dimensions of the source array (of length 1, 2, 3 or 4)
        srcPos - lower left corner of the copied area (of length 1, 2, 3 or 4)
        dest - destination array of the length destDim[0] * destDim[1] * ... * destDim[destDim.length-1]; source and destination arrays must be of the same type
        destDim - dimensions of the destination array
        destPos - lower left corner of the destination area
        size - dimensions of the copied area
      • subarraycopy

        public static final void subarraycopy(java.lang.Object src,
                                              int[] srcDim,
                                              int[] srcPos,
                                              java.lang.Object dest,
                                              int[] destDim,
                                              int[] destPos,
                                              int[] size)
        Copies a rectangular area of rank 1 to 4 from source to target.
        Parameters:
        src - source array of the length srcDim[0] * srcDim[1] * ... * srcDim[srcDim.length-1]
        srcDim - dimensions of the source array (of length 1, 2, 3 or 4)
        srcPos - lower left corner of the copied area (of length 1, 2, 3 or 4)
        dest - destination array of the length destDim[0] * destDim[1] * ... * destDim[destDim.length-1]; source and destination arrays must be of the same type
        destDim - dimensions of the destination array
        destPos - lower left corner of the destination area
        size - dimensions of the copied area
      • createConstant

        public static LargeArray createConstant(LargeArrayType type,
                                                long length,
                                                java.lang.Object value)
        Creates a new constant LargeArray.
        Parameters:
        type - the type of constant LargeArray
        length - the length of constant LargeArray
        value - the value of constant LargeArray
        Returns:
        constant LargeArray of a specified type
      • create

        public static LargeArray create(LargeArrayType type,
                                        long length)
        Creates a new instance of LargeArray. The native memory is zeroed.
        Parameters:
        type - the type of LargeArray
        length - number of elements
        Returns:
        new instance of LargeArray
      • create

        public static LargeArray create(LargeArrayType type,
                                        long length,
                                        boolean zeroNativeMemory)
        Creates a new instance of LargeArray
        Parameters:
        type - the type of LargeArray
        length - number of elements
        zeroNativeMemory - if true, then the native memory is zeroed
        Returns:
        new instance of LargeArray
      • generateRandom

        public static LargeArray generateRandom(LargeArrayType type,
                                                long length)
        Generates a random LargeArray
        Parameters:
        type - the type of LargeArray
        length - number of elements
        Returns:
        random LargeArray
      • convert

        public static LargeArray convert(LargeArray src,
                                         LargeArrayType type)
        Converts LargeArray to a given type.
        Parameters:
        src - the source array
        type - the type of LargeArray
        Returns:
        LargeArray of a specified type
      • select

        public static LargeArray select(LargeArray src,
                                        LogicLargeArray mask)
        Returns all elements of the specified source array for which the corresponding mask element is equal to 1.
        Parameters:
        src - the source array
        mask - the mask array

        Returns:
        selection of elements from the source array

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.