public abstract class PackageFunction extends Object implements Serializable
Constructor and Description |
---|
PackageFunction() |
Modifier and Type | Method and Description |
---|---|
String |
createOutputFilePathAndName(String fname) |
abstract void |
execute()
Method that will be executed to perform this function.
|
void |
execute(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
Method that will be executed to perform this function.
|
String |
getBaseDir() |
String |
getConfiguration()
Method to get the configuration file name
|
FunctionParameter |
getFunctionInput(int pos)
Method to get a specific input to this package function.
|
abstract FunctionParameter |
getFunctionOutput(int pos)
Method to get a specific output of this package function.
|
int |
getNumFunctionInputs()
Method to get the number of inputs to this package function.
|
abstract int |
getNumFunctionOutputs()
Method to get the number of outputs of this package function.
|
boolean |
hasVarNumFunctionOutputs()
Indicates if the function has a variable number of outputs, that
is unknown until the function has been executed.
|
void |
setBaseDir(String dir) |
void |
setConfiguration(String fName)
Method to set the configuration file for this function.
|
void |
setFunctionInputs(ArrayList<FunctionParameter> inputs) |
void |
setInput(FunctionParameter input,
int pos)
Method to set a specific input for this package function
|
void |
setNumFunctionInputs(int numInputs)
Method to set the number of inputs for this package function
|
public final int getNumFunctionInputs()
public final FunctionParameter getFunctionInput(int pos)
pos
- input positionpublic abstract int getNumFunctionOutputs()
public boolean hasVarNumFunctionOutputs()
public abstract FunctionParameter getFunctionOutput(int pos)
pos
- function positionpublic final void setFunctionInputs(ArrayList<FunctionParameter> inputs)
public final void setNumFunctionInputs(int numInputs)
numInputs
- number of inputspublic final void setInput(FunctionParameter input, int pos)
input
- function parameter inputpos
- input positionpublic final void setConfiguration(String fName)
fName
- configuration file namepublic final String getConfiguration()
public void setBaseDir(String dir)
public String getBaseDir()
public abstract void execute()
public void execute(org.apache.sysml.runtime.controlprogram.context.ExecutionContext ec)
ec
- execution context with access to the program
e.g., for access to other dml-bodied or external functions.Copyright © 2018 The Apache Software Foundation. All rights reserved.