Class ACompressedArray<T>

  • All Implemented Interfaces:
    org.apache.hadoop.io.Writable
    Direct Known Subclasses:
    DDCArray

    public abstract class ACompressedArray<T>
    extends Array<T>
    A Compressed Array, in general does not allow us to set or modify the array. In all cases of modification it throws an DMLCompressionException.
    • Constructor Detail

      • ACompressedArray

        public ACompressedArray​(int size)
    • Method Detail

      • get

        public Object get()
        Description copied from class: Array
        Get the underlying array out of the column Group, it is the responsibility of the caller to know what type it is. Also it is not guaranteed that the underlying data structure does not allocate an appropriate response to the caller. This in practice means that if called there is a possibility that the entire array is allocated again. So the method should only be used for debugging purposes not for performance.
        Specified by:
        get in class Array<T>
        Returns:
        The underlying array.
      • set

        public void set​(int index,
                        T value)
        Description copied from class: Array
        Set index to the given value of same type
        Specified by:
        set in class Array<T>
        Parameters:
        index - The index to set
        value - The value to assign
      • set

        public void set​(int index,
                        double value)
        Description copied from class: Array
        Set index to given double value (cast to the correct type of this array)
        Specified by:
        set in class Array<T>
        Parameters:
        index - the index to set
        value - the value to set it to (before casting to correct value type)
      • set

        public void set​(int index,
                        String value)
        Description copied from class: Array
        Set index to the given value of the string parsed.
        Specified by:
        set in class Array<T>
        Parameters:
        index - The index to set
        value - The value to assign
      • setFromOtherType

        public void setFromOtherType​(int rl,
                                     int ru,
                                     Array<?> value)
        Description copied from class: Array
        Set range to given arrays value
        Specified by:
        setFromOtherType in class Array<T>
        Parameters:
        rl - row lower
        ru - row upper (inclusive)
        value - value array to take values from (other type)
      • set

        public void set​(int rl,
                        int ru,
                        Array<T> value)
        Description copied from class: Array
        Set range to given arrays value
        Overrides:
        set in class Array<T>
        Parameters:
        rl - row lower
        ru - row upper (inclusive)
        value - value array to take values from (same type)
      • set

        public void set​(int rl,
                        int ru,
                        Array<T> value,
                        int rlSrc)
        Description copied from class: Array
        Set range to given arrays value with an offset into other array
        Overrides:
        set in class Array<T>
        Parameters:
        rl - row lower
        ru - row upper (inclusive)
        value - value array to take values from
        rlSrc - the offset into the value array to take values from
      • setNz

        public void setNz​(int rl,
                          int ru,
                          Array<T> value)
        Description copied from class: Array
        Set non default values in the range from the value array given
        Specified by:
        setNz in class Array<T>
        Parameters:
        rl - row start
        ru - row upper inclusive
        value - value array of same type
      • setFromOtherTypeNz

        public void setFromOtherTypeNz​(int rl,
                                       int ru,
                                       Array<?> value)
        Description copied from class: Array
        Set non default values in the range from the value array given
        Specified by:
        setFromOtherTypeNz in class Array<T>
        Parameters:
        rl - row start
        ru - row end inclusive
        value - value array of different type
      • append

        public void append​(String value)
        Description copied from class: Array
        Append a string value to the current Array, this should in general be avoided, and appending larger blocks at a time should be preferred.
        Specified by:
        append in class Array<T>
        Parameters:
        value - The value to append
      • append

        public void append​(T value)
        Description copied from class: Array
        Append a value of the same type of the Array. This should in general be avoided, and appending larger blocks at a time should be preferred.
        Specified by:
        append in class Array<T>
        Parameters:
        value - The value to append
      • fill

        public void fill​(String val)
        Description copied from class: Array
        fill the entire array with specific value.
        Specified by:
        fill in class Array<T>
        Parameters:
        val - the value to fill with.
      • fill

        public void fill​(T val)
        Description copied from class: Array
        fill the entire array with specific value.
        Specified by:
        fill in class Array<T>
        Parameters:
        val - the value to fill with.
      • reset

        public void reset​(int size)
        Description copied from class: Array
        Reset the Array and set to a different size. This method is used to reuse an already allocated Array, without extra allocation. It should only be done in cases where the Array is no longer in use in any FrameBlocks.
        Specified by:
        reset in class Array<T>
        Parameters:
        size - The size to reallocate into.