Array (Apache SystemDS 3.4.0-SNAPSHOT API)
Pair<Types.ValueType,Boolean>
analyzeValueType()
Analyze the column to figure out if the value type can be refined to a better type.
abstract Pair<Types.ValueType,Boolean>
analyzeValueType(int maxCells)
Analyze the column to figure out if the value type can be refined to a better type.
abstract 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.
abstract Array<T>
append(Array<T> other)
Append other array, if the other array is fitting in current allocated size use that allocated size, otherwise allocate new array to combine the other with this.
abstract void
append(T value)
Append a value of the same type of the Array.
static long
baseMemoryCost()
Get the base memory cost of the Arrays allocation.
Array<?>
changeType(Types.ValueType t)
Change the allocated array to a different type.
Array<?>
changeType(Types.ValueType t,
boolean containsNull)
Change type taking into consideration if the target type must be able to contain Null.
Array<?>
changeType(Array<?> ret)
Change type by moving this arrays value into the given ret array.
Array<?>
changeType(Array<?> ret,
int rl,
int ru)
Put the changed value types into the given ret array inside the range specified.
Array<?>
changeTypeWithNulls(Types.ValueType t)
Array<?>
changeTypeWithNulls(Array<?> ret)
Array<?>
changeTypeWithNulls(Array<?> ret,
int l,
int u)
abstract Array<T>
clone()
Overwrite of the java internal clone function for arrays, return a clone of underlying data that is mutable, (not immutable data.) Immutable data is dependent on the individual allocated arrays
boolean
containsNull()
analyze if the array contains null values.
boolean
equals(Object other)
abstract boolean
equals(Array<T> other)
Equals operation on arrays.
double[]
extractDouble(double[] ret,
int rl,
int ru)
Extract the sub array into the ret array as doubles.
abstract void
fill(String val)
fill the entire array with specific value.
abstract void
fill(T val)
fill the entire array with specific value.
void
findEmpty(boolean[] select)
Find the empty rows, it is assumed that the input is to be only modified to set variables to true.
void
findEmptyInverse(boolean[] select)
Find the filled rows, it is assumed that the input i to be only modified to set variables to true;
abstract Object
get()
Get the underlying array out of the column Group, it is the responsibility of the caller to know what type it is.
abstract T
get(int index)
Get the value at a given index.
abstract byte[]
getAsByteArray()
Return the current allocated Array as a byte[], this is used to serialize the allocated Arrays out to the PythonAPI.
abstract double
getAsDouble(int i)
Get the index's value.
double
getAsNaNDouble(int i)
Get the index's value.
SoftReference<Map<T,Integer>>
getCache()
Get the current cached recode map.
abstract long
getExactSerializedSize()
Get the exact serialized size on disk of this array.
abstract ArrayFactory.FrameArrayType
getFrameArrayType()
Get the internal FrameArrayType, to specify the encoding of the Types, note there are more Frame Array Types than there is ValueTypes.
long
getInMemorySize()
Get in memory size, not counting reference to this object.
T
getInternal(int index)
Get the internal value at a given index.
Array.ArrayIterator
getIterator()
Pair<Integer,Integer>
getMinMaxLength()
Get the minimum and maximum length of the contained values as string type.
ABooleanArray
getNulls()
Map<T,Integer>
getRecodeMap()
Get a recode map that maps each unique value in the array, to a long ID.
Map<T,Integer>
getRecodeMap(int estimate)
Get a recode map that maps each unique value in the array, to a long ID.
Map<T,Integer>
getRecodeMap(int estimate,
ExecutorService pool,
int k)
Get a recode map that maps each unique value in the array, to a long ID.
abstract Types.ValueType
getValueType()
Get the current value type of this array.
abstract double
hashDouble(int idx)
Hash the given index of the array.
abstract boolean
isEmpty()
Get if this array is empty, aka filled with empty values.
abstract boolean
isNotEmpty(int i)
abstract boolean
isShallowSerialize()
analyze if this array can be shallow serialized.
double[]
minMax()
Get the minimum and maximum double value of this array.
double[]
minMax(int l,
int u)
Get the minimum and maximum double value of a specific sub part of this array.
abstract boolean
possiblyContainsNaN()
abstract void
reset(int size)
Reset the Array and set to a different size.
abstract Array<T>
select(boolean[] select,
int nTrue)
Slice out the true indices in the select input and return the sub array.
abstract Array<T>
select(int[] indices)
Slice out the specified indices and return the sub array.
abstract 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)
Set range to given arrays value
void
set(int rl,
int ru,
Array<T> value,
int rlSrc)
Set range to given arrays value with an offset into other array
abstract void
set(int index,
String value)
Set index to the given value of the string parsed.
abstract void
set(int index,
T value)
Set index to the given value of same type
void
setCache(SoftReference<Map<T,Integer>> m)
Set the cached hashmap cache of this Array allocation, to be used in transformEncode.
abstract void
setFromOtherType(int rl,
int ru,
Array<?> value)
Set range to given arrays value
abstract void
setFromOtherTypeNz(int rl,
int ru,
Array<?> value)
Set non default values in the range from the value array given
void
setFromOtherTypeNz(Array<?> value)
Set non default values from the value array given
void
setM(HashMapToInt<T> map,
int si,
AMapToData m,
int i)
Set the index i in the map given based on the mapping provided.
void
setM(HashMapToInt<T> map,
AMapToData m,
int i)
Set the index i in the map given based on the mapping provided.
abstract void
setNz(int rl,
int ru,
Array<T> value)
Set non default values in the range from the value array given
void
setNz(Array<T> value)
Set non default values from the value array given
int
size()
Get the number of elements in the array, this does not necessarily reflect the current allocated size.
abstract Array<T>
slice(int rl,
int ru)
Slice out the sub range and return new array with the specified type.
ArrayCompressionStatistics
statistics(int nSamples)
Get the compression statistics of this array allocation.
String
toString()