public class ResultVariables extends Object
PreparedScript
's executeScript
method, which executes a DML/PyDML script.Constructor and Description |
---|
ResultVariables() |
Modifier and Type | Method and Description |
---|---|
protected void |
addResult(String ovar,
org.apache.sysml.runtime.instructions.cp.Data data)
Add the output variable name and generated output data to the ResultVariable
object.
|
boolean |
getBoolean(String varname)
Obtain the boolean value represented by the given output variable.
|
double |
getDouble(String varname)
Obtain the double value represented by the given output variable.
|
String[][] |
getFrame(String varname)
Obtain the frame represented by the given output variable.
|
FrameBlock |
getFrameBlock(String varname)
Obtain the frame represented by the given output variable.
|
long |
getLong(String varname)
Obtain the long value represented by the given output variable.
|
double[][] |
getMatrix(String varname)
Obtain the matrix represented by the given output variable.
|
MatrixBlock |
getMatrixBlock(String varname)
Obtain the matrix represented by the given output variable.
|
org.apache.sysml.runtime.instructions.cp.ScalarObject |
getScalarObject(String varname)
Obtain the ScalarObject represented by the given output variable.
|
String |
getString(String varname)
Obtain the string value represented by the given output variable.
|
Set<String> |
getVariableNames()
Obtain the output variable names held by this ResultVariables object.
|
int |
size()
Obtain the number of output data held by this ResultVariables object.
|
public Set<String> getVariableNames()
public int size()
public double[][] getMatrix(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic MatrixBlock getMatrixBlock(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic String[][] getFrame(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic FrameBlock getFrameBlock(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic double getDouble(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic boolean getBoolean(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic long getLong(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic String getString(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occurspublic org.apache.sysml.runtime.instructions.cp.ScalarObject getScalarObject(String varname) throws DMLException
varname
- output variable nameDMLException
- if DMLException occursprotected void addResult(String ovar, org.apache.sysml.runtime.instructions.cp.Data data)
PreparedScript
's
executeScript
method.ovar
- output variable namedata
- generated output dataCopyright © 2017 The Apache Software Foundation. All rights reserved.