Class ListObject

java.lang.Object
org.apache.sysds.runtime.instructions.cp.Data
org.apache.sysds.runtime.instructions.cp.ListObject
All Implemented Interfaces:
Externalizable, Serializable

public class ListObject extends Data implements Externalizable
See Also:
  • Constructor Details

  • 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

      public List<String> getNames()
    • setNames

      public void setNames(List<String> names)
    • getName

      public String getName(int ix)
    • isNamedList

      public boolean isNamedList()
    • getData

      public List<Data> getData()
    • getData

      public Data getData(int ix)
    • getData

      public Data getData(String name)
    • getLineageItem

      public LineageItem getLineageItem(String name)
    • getLineageItems

      public List<LineageItem> getLineageItems()
    • contains

      public boolean contains(Data d)
    • contains

      public boolean contains(String name)
    • getDataSize

      public long getDataSize()
    • checkAllDataTypes

      public boolean checkAllDataTypes(Types.DataType dt)
    • slice

      public Data slice(int ix)
    • getLineageItem

      public LineageItem getLineageItem(int ix)
    • slice

      public ListObject slice(int ix1, int ix2)
    • slice

      public Data slice(String name)
    • slice

      public ListObject slice(String name1, String name2)
    • copy

      public ListObject copy()
    • set

      public ListObject set(int ix, Data data)
    • set

      public ListObject set(int ix, Data data, LineageItem li)
    • set

      public ListObject set(int ix1, int ix2, ListObject data)
    • set

      public Data set(String name, Data data)
    • set

      public Data set(String name, Data data, LineageItem li)
    • set

      public ListObject set(String name1, String name2, ListObject data)
    • add

      public ListObject add(Data dat, LineageItem li)
    • add

      public ListObject add(String name, Data dat, LineageItem li)
    • remove

      public ListObject 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.
      Parameters:
      pos - position of element in the list
      Returns:
      new ListObject with the specified element
    • getDebugName

      public String getDebugName()
      Specified by:
      getDebugName in class Data
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(boolean metaOnly)
      Overrides:
      toString in class Data
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.
      Specified by:
      writeExternal in interface Externalizable
      Parameters:
      out - object output
      Throws:
      IOException - if IOException occurs
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.
      Specified by:
      readExternal in interface Externalizable
      Parameters:
      in - object input
      Throws:
      IOException - if IOException occurs
      ClassNotFoundException
    • getCleanupStates

      public List<Boolean> 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

      public void enableCleanup(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. 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.