Class ListObject
java.lang.Object
org.apache.sysds.runtime.instructions.cp.Data
org.apache.sysds.runtime.instructions.cp.ListObject
- All Implemented Interfaces:
Externalizable,Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionListObject(List<Data> data) ListObject(List<Data> data, List<String> names) ListObject(List<Data> data, List<String> names, List<LineageItem> lineage) ListObject(Data[] data) ListObject(Data[] data, String[] names) ListObject(ListObject that) -
Method Summary
Modifier and TypeMethodDescriptionadd(String name, Data dat, LineageItem li) add(Data dat, LineageItem li) booleanbooleanbooleancopy()voidvoidenableCleanup(boolean flag) Sets the cleanupFlag values recursively for every element of type CacheableData in the list and in its sublists to the provided flag value.voidenableCleanup(Queue<Boolean> flags) Sets the cleanupFlag values recursively for every element of type CacheableData in the list and in its sublists to the provided values in flags.Gets list of current cleanupFlag values recursively for every element in the list and in its sublists of type CacheableData.getData()getData(int ix) longintgetLineageItem(int ix) getLineageItem(String name) getName(int ix) getNames()intboolean[]booleanvoidRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.remove(int pos) Removes the element at the specified position from the list and returns that element as the only element in a new ListObject.set(int ix1, int ix2, ListObject data) set(int ix, Data data, LineageItem li) set(String name1, String name2, ListObject data) set(String name, Data data, LineageItem li) voidvoidsetStatus(boolean[] status) slice(int ix) slice(int ix1, int ix2) toString()toString(boolean metaOnly) voidRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.Methods inherited from class org.apache.sysds.runtime.instructions.cp.Data
getDataType, getMetaData, getValueType, removeMetaData, setMetaData, updateDataCharacteristics
-
Constructor Details
-
ListObject
public ListObject() -
ListObject
-
ListObject
-
ListObject
-
ListObject
-
ListObject
-
ListObject
-
-
Method Details
-
deriveAndSetStatusFromData
public void deriveAndSetStatusFromData() -
setStatus
public void setStatus(boolean[] status) -
getStatus
public boolean[] getStatus() -
getLength
public int getLength() -
getNumCacheableData
public int getNumCacheableData() -
getNames
-
setNames
-
getName
-
isNamedList
public boolean isNamedList() -
getData
-
getData
-
getData
-
getLineageItem
-
getLineageItems
-
contains
-
contains
-
getDataSize
public long getDataSize() -
checkAllDataTypes
-
slice
-
getLineageItem
-
slice
-
slice
-
slice
-
copy
-
set
-
set
-
set
-
set
-
set
-
set
-
add
-
add
-
remove
Removes the element at the specified position from the list and returns that element as the only element in a new ListObject.- Parameters:
pos- position of element in the list- Returns:
- new ListObject with the specified element
-
getDebugName
- Specified by:
getDebugNamein classData
-
toString
-
toString
-
writeExternal
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.- Specified by:
writeExternalin interfaceExternalizable- Parameters:
out- object output- Throws:
IOException- if IOException occurs
-
readExternal
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.- Specified by:
readExternalin interfaceExternalizable- Parameters:
in- object input- Throws:
IOException- if IOException occursClassNotFoundException
-
getCleanupStates
Gets list of current cleanupFlag values recursively for every element in the list and in its sublists of type CacheableData. The order is as CacheableData elements are discovered during DFS. Elements that are not of type CacheableData are skipped.- Returns:
- list of booleans containing the _cleanupFlag values.
-
enableCleanup
public void enableCleanup(boolean flag) Sets the cleanupFlag values recursively for every element of type CacheableData in the list and in its sublists to the provided flag value.- Parameters:
flag- New value for every CacheableData element.
-
enableCleanup
Sets the cleanupFlag values recursively for every element of type CacheableData in the list and in its sublists to the provided values in flags. The cleanupFlag value of the i-th CacheableData element in the list (counted in the order of DFS) is set to the i-th value in flags.- Parameters:
flags- Queue of values in the same order as its corresponding elements occur in DFS.
-