Class ResultVariables

java.lang.Object
org.apache.sysds.api.jmlc.ResultVariables

public class ResultVariables extends Object
A ResultVariables object holds the data returned by a call to PreparedScript's executeScript method, which executes a DML/PyDML script.
  • Constructor Details

    • ResultVariables

      public ResultVariables()
  • Method Details

    • getVariableNames

      public Set<String> getVariableNames()
      Obtain the output variable names held by this ResultVariables object.
      Returns:
      the set of output variable names
    • size

      public int size()
      Obtain the number of output data held by this ResultVariables object.
      Returns:
      the number of output variables with data
    • getMatrix

      public double[][] getMatrix(String varname)
      Obtain the matrix represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      matrix as a two-dimensional double array
    • getMatrixBlock

      public MatrixBlock getMatrixBlock(String varname)
      Obtain the matrix represented by the given output variable. Calling this method avoids unnecessary output conversions.
      Parameters:
      varname - output variable name
      Returns:
      matrix as matrix block
    • getFrame

      public String[][] getFrame(String varname)
      Obtain the frame represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      frame as a two-dimensional string array
    • getFrameBlock

      public FrameBlock getFrameBlock(String varname)
      Obtain the frame represented by the given output variable. Calling this method avoids unnecessary output conversions.
      Parameters:
      varname - output variable name
      Returns:
      frame as a frame block
    • getDouble

      public double getDouble(String varname)
      Obtain the double value represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      double value
    • getBoolean

      public boolean getBoolean(String varname)
      Obtain the boolean value represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      boolean value
    • getLong

      public long getLong(String varname)
      Obtain the long value represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      long value
    • getString

      public String getString(String varname)
      Obtain the string value represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      string value
    • getScalarObject

      public ScalarObject getScalarObject(String varname)
      Obtain the ScalarObject represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      ScalarObject
    • getList

      public List<Data> getList(String varname)
      Obtain the list represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      ListObject
    • getListObject

      public ListObject getListObject(String varname)
      Obtain the ListObject represented by the given output variable.
      Parameters:
      varname - output variable name
      Returns:
      ListObject