public class PreparedScript extends Object
Modifier | Constructor and Description |
---|---|
protected |
PreparedScript(org.apache.sysml.runtime.controlprogram.Program prog,
String[] inputs,
String[] outputs)
Meant to be invoked only from Connection.
|
Modifier and Type | Method and Description |
---|---|
void |
clearParameters()
Remove all current values bound to input or output variables.
|
ResultVariables |
executeScript()
Executes the prepared script over the bound inputs, creating the
result variables according to bound and registered outputs.
|
String |
explain()
Explain the DML/PyDML program and view result as a string.
|
void |
setFrame(String varname,
FrameBlock frame,
boolean reuse)
Binds a frame object to a registered input variable.
|
void |
setFrame(String varname,
String[][] frame)
Binds a frame object to a registered input variable.
|
void |
setFrame(String varname,
String[][] frame,
boolean reuse)
Binds a frame object to a registered input variable.
|
void |
setFrame(String varname,
String[][] frame,
List<org.apache.sysml.parser.Expression.ValueType> schema)
Binds a frame object to a registered input variable.
|
void |
setFrame(String varname,
String[][] frame,
List<org.apache.sysml.parser.Expression.ValueType> schema,
boolean reuse)
Binds a frame object to a registered input variable.
|
void |
setFrame(String varname,
String[][] frame,
List<org.apache.sysml.parser.Expression.ValueType> schema,
List<String> colnames)
Binds a frame object to a registered input variable.
|
void |
setFrame(String varname,
String[][] frame,
List<org.apache.sysml.parser.Expression.ValueType> schema,
List<String> colnames,
boolean reuse)
Binds a frame object to a registered input variable.
|
void |
setMatrix(String varname,
double[][] matrix)
Binds a matrix object to a registered input variable.
|
void |
setMatrix(String varname,
double[][] matrix,
boolean reuse)
Binds a matrix object to a registered input variable.
|
void |
setMatrix(String varname,
MatrixBlock matrix,
boolean reuse)
Binds a matrix object to a registered input variable.
|
void |
setScalar(String varname,
boolean scalar)
Binds a scalar boolean to a registered input variable.
|
void |
setScalar(String varname,
boolean scalar,
boolean reuse)
Binds a scalar boolean to a registered input variable.
|
void |
setScalar(String varname,
double scalar)
Binds a scalar double to a registered input variable.
|
void |
setScalar(String varname,
double scalar,
boolean reuse)
Binds a scalar double to a registered input variable.
|
void |
setScalar(String varname,
long scalar)
Binds a scalar long to a registered input variable.
|
void |
setScalar(String varname,
long scalar,
boolean reuse)
Binds a scalar long to a registered input variable.
|
void |
setScalar(String varname,
org.apache.sysml.runtime.instructions.cp.ScalarObject scalar,
boolean reuse)
Binds a scalar object to a registered input variable.
|
void |
setScalar(String varname,
String scalar)
Binds a scalar string to a registered input variable.
|
void |
setScalar(String varname,
String scalar,
boolean reuse)
Binds a scalar string to a registered input variable.
|
public void setScalar(String varname, boolean scalar) throws DMLException
varname
- input variable namescalar
- boolean valueDMLException
- if DMLException occurspublic void setScalar(String varname, boolean scalar, boolean reuse) throws DMLException
varname
- input variable namescalar
- boolean valuereuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setScalar(String varname, long scalar) throws DMLException
varname
- input variable namescalar
- long valueDMLException
- if DMLException occurspublic void setScalar(String varname, long scalar, boolean reuse) throws DMLException
varname
- input variable namescalar
- long valuereuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setScalar(String varname, double scalar) throws DMLException
varname
- input variable namescalar
- double valueDMLException
- if DMLException occurspublic void setScalar(String varname, double scalar, boolean reuse) throws DMLException
varname
- input variable namescalar
- double valuereuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setScalar(String varname, String scalar) throws DMLException
varname
- input variable namescalar
- string valueDMLException
- if DMLException occurspublic void setScalar(String varname, String scalar, boolean reuse) throws DMLException
varname
- input variable namescalar
- string valuereuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setScalar(String varname, org.apache.sysml.runtime.instructions.cp.ScalarObject scalar, boolean reuse) throws DMLException
executeScript
calls.varname
- input variable namescalar
- scalar objectreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setMatrix(String varname, double[][] matrix) throws DMLException
varname
- input variable namematrix
- two-dimensional double array matrix representationDMLException
- if DMLException occurspublic void setMatrix(String varname, double[][] matrix, boolean reuse) throws DMLException
varname
- input variable namematrix
- two-dimensional double array matrix representationreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setMatrix(String varname, MatrixBlock matrix, boolean reuse) throws DMLException
executeScript
calls.varname
- input variable namematrix
- matrix represented as a MatrixBlockreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setFrame(String varname, String[][] frame) throws DMLException
varname
- input variable nameframe
- two-dimensional string array frame representationDMLException
- if DMLException occurspublic void setFrame(String varname, String[][] frame, List<org.apache.sysml.parser.Expression.ValueType> schema) throws DMLException
varname
- input variable nameframe
- two-dimensional string array frame representationschema
- list representing the types of the frame columnsDMLException
- if DMLException occurspublic void setFrame(String varname, String[][] frame, List<org.apache.sysml.parser.Expression.ValueType> schema, List<String> colnames) throws DMLException
varname
- input variable nameframe
- two-dimensional string array frame representationschema
- list representing the types of the frame columnscolnames
- frame column namesDMLException
- if DMLException occurspublic void setFrame(String varname, String[][] frame, boolean reuse) throws DMLException
varname
- input variable nameframe
- two-dimensional string array frame representationreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setFrame(String varname, String[][] frame, List<org.apache.sysml.parser.Expression.ValueType> schema, boolean reuse) throws DMLException
varname
- input variable nameframe
- two-dimensional string array frame representationschema
- list representing the types of the frame columnsreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setFrame(String varname, String[][] frame, List<org.apache.sysml.parser.Expression.ValueType> schema, List<String> colnames, boolean reuse) throws DMLException
varname
- input variable nameframe
- two-dimensional string array frame representationschema
- list representing the types of the frame columnscolnames
- frame column namesreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void setFrame(String varname, FrameBlock frame, boolean reuse) throws DMLException
executeScript
calls.varname
- input variable nameframe
- frame represented as a FrameBlockreuse
- if true
, preserve value over multiple executeScript
callsDMLException
- if DMLException occurspublic void clearParameters()
public ResultVariables executeScript() throws DMLException
DMLException
- if DMLException occurspublic String explain() throws DMLException
DMLException
- if DMLException occursCopyright © 2017 The Apache Software Foundation. All rights reserved.