Class ACompressedArray<T>
- java.lang.Object
-
- org.apache.sysds.runtime.frame.data.columns.Array<T>
-
- org.apache.sysds.runtime.frame.data.columns.ACompressedArray<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sysds.runtime.frame.data.columns.Array
Array.ArrayIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
append(String value)
Append a string value to the current Array, this should in general be avoided, and appending larger blocks at a time should be preferred.void
append(T value)
Append a value of the same type of the Array.abstract Array<?>
changeType(Types.ValueType t)
Change the allocated array to a different type.void
fill(String val)
fill the entire array with specific value.void
fill(T val)
fill the entire array with specific value.Object
get()
Get the underlying array out of the column Group, it is the responsibility of the caller to know what type it is.void
reset(int size)
Reset the Array and set to a different size.void
set(int index, double value)
Set index to given double value (cast to the correct type of this array)void
set(int rl, int ru, Array<T> value, int rlSrc)
Set range to given arrays value with an offset into other arrayvoid
set(int index, String value)
Set index to the given value of the string parsed.void
set(int index, T value)
Set index to the given value of same typevoid
setFromOtherType(int rl, int ru, Array<?> value)
Set range to given arrays valuevoid
setFromOtherTypeNz(int rl, int ru, Array<?> value)
Set non default values in the range from the value array givenvoid
setNz(int rl, int ru, Array<T> value)
Set non default values in the range from the value array givenabstract ArrayCompressionStatistics
statistics(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, getValueType, hashDouble, isEmpty, isNotEmpty, isShallowSerialize, minMax, minMax, possiblyContainsNaN, select, select, set, setCache, setFromOtherTypeNz, setNz, size, slice, toString
-
-
-
-
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.
-
set
public void set(int index, T value)
Description copied from class:Array
Set index to the given value of same type
-
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)
-
set
public void set(int index, String value)
Description copied from class:Array
Set index to the given value of the string parsed.
-
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 classArray<T>
- Parameters:
rl
- row lowerru
- row upper (inclusive)value
- value array to take values from (other 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
-
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
-
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 classArray<T>
- Parameters:
rl
- row startru
- row end inclusivevalue
- 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.
-
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.
-
fill
public void fill(String val)
Description copied from class:Array
fill the entire array with specific value.
-
fill
public void fill(T val)
Description copied from class:Array
fill the entire array with specific value.
-
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.
-
statistics
public abstract ArrayCompressionStatistics statistics(int nSamples)
Description copied from class:Array
Get the compression statistics of this array allocation.- Overrides:
statistics
in classArray<T>
- Parameters:
nSamples
- The number of sample elements suggested (not forced) to be used.- Returns:
- The compression statistics of this array.
-
changeType
public abstract Array<?> changeType(Types.ValueType t)
Description copied from class:Array
Change the allocated array to a different type. If the type is the same a deep copy is returned for safety.- Overrides:
changeType
in classArray<T>
- Parameters:
t
- The type to change to- Returns:
- A new column array.
-
-