Package org.apache.sysds.api.jmlc
Class ResultVariables
java.lang.Object
org.apache.sysds.api.jmlc.ResultVariables
A ResultVariables object holds the data returned by a call
to
PreparedScript's executeScript
method, which executes a DML/PyDML script.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(String varname) Obtain the boolean value represented by the given output variable.doubleObtain the double value represented by the given output variable.String[][]Obtain the frame represented by the given output variable.getFrameBlock(String varname) Obtain the frame represented by the given output variable.Obtain the list represented by the given output variable.getListObject(String varname) Obtain the ListObject represented by the given output variable.longObtain the long value represented by the given output variable.double[][]Obtain the matrix represented by the given output variable.getMatrixBlock(String varname) Obtain the matrix represented by the given output variable.getScalarObject(String varname) Obtain the ScalarObject represented by the given output variable.Obtain the string value represented by the given output variable.Obtain the output variable names held by this ResultVariables object.intsize()Obtain the number of output data held by this ResultVariables object.
-
Constructor Details
-
ResultVariables
public ResultVariables()
-
-
Method Details
-
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
Obtain the matrix represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- matrix as a two-dimensional double array
-
getMatrixBlock
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
Obtain the frame represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- frame as a two-dimensional string array
-
getFrameBlock
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
Obtain the double value represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- double value
-
getBoolean
Obtain the boolean value represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- boolean value
-
getLong
Obtain the long value represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- long value
-
getString
Obtain the string value represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- string value
-
getScalarObject
Obtain the ScalarObject represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- ScalarObject
-
getList
Obtain the list represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- ListObject
-
getListObject
Obtain the ListObject represented by the given output variable.- Parameters:
varname- output variable name- Returns:
- ListObject
-