Interface ArrayFactory


  • public interface ArrayFactory
    • Field Detail

      • LOG

        static final org.apache.commons.logging.Log LOG
    • Method Detail

      • createHash64

        static HashLongArray createHash64​(long[] col)
      • create

        static LongArray create​(long[] col)
      • create

        static FloatArray create​(float[] col)
      • create

        static CharArray create​(char[] col)
      • create

        static <T> RaggedArray<T> create​(T[] col,
                                         int m)
      • getInMemorySize

        static long getInMemorySize​(Types.ValueType type,
                                    int _numRows,
                                    boolean containsNull)
      • allocateBoolean

        static ABooleanArray allocateBoolean​(int nRow)
      • append

        static <C> Array<C> append​(Array<?> a,
                                   Array<?> b)
        append arrays to each other, and cast to highest common type if different types.
        Type Parameters:
        C - The type to return, java automatically make this Object, and this is fine.
        Parameters:
        a - The first array to append to (potentially modifying this a if applicable)
        b - The array to append to a, (not getting modified).
        Returns:
        A array containing the concatenation of the two.
      • set

        static <C> Array<C> set​(Array<?> target,
                                Array<?> src,
                                int rl,
                                int ru,
                                int rlen)
        Set the target array in the range of rl to ru with the src array. The type returned is the common or highest common type of array.
        Type Parameters:
        C - The highest common type to return.
        Parameters:
        target - The target to put the values into
        src - The source to take the values from
        rl - The index to start on
        ru - The index to end on (inclusive)
        rlen - The length of the target (a parameter in case target is null)
        Returns:
        A new or modified array.