Class ACompressedArray<T>
java.lang.Object
org.apache.sysds.runtime.frame.data.columns.Array<T>
org.apache.sysds.runtime.frame.data.columns.ACompressedArray<T>
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
- Direct Known Subclasses:
DDCArray
A Compressed Array, in general does not allow us to set or modify the array.
In all cases of modification it throws an DMLCompressionException.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sysds.runtime.frame.data.columns.Array
Array.ArrayIterator -
Field Summary
Fields inherited from class org.apache.sysds.runtime.frame.data.columns.Array
ROW_PARALLELIZATION_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend a string value to the current Array, this should in general be avoided, and appending larger blocks at a time should be preferred.voidAppend a value of the same type of the Array.abstract Array<?>Change the allocated array to a different type.voidfill the entire array with specific value.voidfill the entire array with specific value.get()Get the underlying array out of the column Group, it is the responsibility of the caller to know what type it is.voidreset(int size) Reset the Array and set to a different size.voidset(int index, double value) Set index to given double value (cast to the correct type of this array)voidSet index to the given value of the string parsed.voidSet index to the given value of same typevoidsetFromOtherType(int rl, int ru, Array<?> value) Set range to given arrays valuevoidsetFromOtherTypeNz(int rl, int ru, Array<?> value) Set non default values in the range from the value array givenvoidSet non default values in the range from the value array givenabstract ArrayCompressionStatisticsstatistics(int nSamples) Get the compression statistics of this array allocation.Methods inherited from class org.apache.sysds.runtime.frame.data.columns.Array
analyzeValueType, analyzeValueType, append, baseMemoryCost, changeType, changeType, changeType, changeTypeWithNulls, changeTypeWithNulls, changeTypeWithNulls, clone, containsNull, equals, equals, extractDouble, findEmpty, findEmptyInverse, get, getAsByteArray, getAsDouble, getAsNaNDouble, getCache, getExactSerializedSize, getFrameArrayType, getInMemorySize, getInternal, getIterator, getMinMaxLength, getNulls, getRecodeMap, getRecodeMap, getRecodeMap, getValueType, hashDouble, isEmpty, isNotEmpty, isShallowSerialize, minMax, minMax, possiblyContainsNaN, select, select, set, set, setCache, setFromOtherTypeNz, setM, setM, setNz, size, slice, toStringMethods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.io.Writable
readFields, write
-
Method Details
-
get
Description copied from class:ArrayGet 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. -
set
Description copied from class:ArraySet index to the given value of same type -
set
public void set(int index, double value) Description copied from class:ArraySet index to given double value (cast to the correct type of this array) -
set
Description copied from class:ArraySet index to the given value of the string parsed. -
setFromOtherType
Description copied from class:ArraySet range to given arrays value- Specified by:
setFromOtherTypein classArray<T>- Parameters:
rl- row lowerru- row upper (inclusive)value- value array to take values from (other type)
-
setNz
Description copied from class:ArraySet non default values in the range from the value array given -
setFromOtherTypeNz
Description copied from class:ArraySet non default values in the range from the value array given- Specified by:
setFromOtherTypeNzin classArray<T>- Parameters:
rl- row startru- row end inclusivevalue- value array of different type
-
append
Description copied from class:ArrayAppend a string value to the current Array, this should in general be avoided, and appending larger blocks at a time should be preferred. -
append
Description copied from class:ArrayAppend 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. -
fill
Description copied from class:Arrayfill the entire array with specific value. -
fill
Description copied from class:Arrayfill the entire array with specific value. -
reset
public void reset(int size) Description copied from class:ArrayReset 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. -
statistics
Description copied from class:ArrayGet the compression statistics of this array allocation.- Overrides:
statisticsin classArray<T>- Parameters:
nSamples- The number of sample elements suggested (not forced) to be used.- Returns:
- The compression statistics of this array.
-
changeType
Description copied from class:ArrayChange the allocated array to a different type. If the type is the same a deep copy is returned for safety.- Overrides:
changeTypein classArray<T>- Parameters:
t- The type to change to- Returns:
- A new column array.
-