Package org.apache.sysds.parser
Class BuiltinFunctionExpression
- java.lang.Object
-
- org.apache.sysds.parser.Expression
-
- org.apache.sysds.parser.Identifier
-
- org.apache.sysds.parser.DataIdentifier
-
- org.apache.sysds.parser.BuiltinFunctionExpression
-
- All Implemented Interfaces:
ParseInfo
public class BuiltinFunctionExpression extends DataIdentifier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sysds.parser.Expression
Expression.BinaryOp, Expression.BooleanOp, Expression.DataOp, Expression.FunctCallOp, Expression.RelationalOp
-
-
Constructor Summary
Constructors Constructor Description BuiltinFunctionExpression(org.antlr.v4.runtime.ParserRuleContext ctx, Builtins bifop, ArrayList<ParameterExpression> args, String fname)
BuiltinFunctionExpression(org.antlr.v4.runtime.ParserRuleContext ctx, Builtins bifop, Expression[] args, String fname)
BuiltinFunctionExpression(Builtins bifop, Expression[] args, ParseInfo parseInfo)
-
Method Summary
-
Methods inherited from class org.apache.sysds.parser.DataIdentifier
equals, getName, hashCode, setName
-
Methods inherited from class org.apache.sysds.parser.Identifier
computeDataType, dimsKnown, getBlocksize, getDataType, getDim1, getDim2, getFileFormat, getNnz, getPrivacy, getValueType, isScalarBoolean, setBlocksize, setBooleanProperties, setDataType, setDimensions, setDimensionValueProperties, setFileFormat, setIntProperties, setNnz, setPrivacy, setPrivacy, setProperties, setValueType
-
Methods inherited from class org.apache.sysds.parser.Expression
computeDataType, computeDataType, computeValueType, computeValueType, computeValueType, convertFormatType, getBeginColumn, getBeginLine, getBinaryMatrixCharacteristics, getBinaryOp, getBooleanOp, getEndColumn, getEndLine, getFilename, getOutput, getOutputs, getParseExceptionList, getRelationalOp, getTempName, getText, printErrorLocation, printInfoLocation, printWarningLocation, raiseValidateError, raiseValidateError, raiseValidateError, setBeginColumn, setBeginLine, setCtxValues, setCtxValuesAndFilename, setEndColumn, setEndLine, setFilename, setOutput, setParseExceptionList, setParseInfo, setText
-
-
-
-
Constructor Detail
-
BuiltinFunctionExpression
public BuiltinFunctionExpression(org.antlr.v4.runtime.ParserRuleContext ctx, Builtins bifop, ArrayList<ParameterExpression> args, String fname)
-
BuiltinFunctionExpression
public BuiltinFunctionExpression(Builtins bifop, Expression[] args, ParseInfo parseInfo)
-
BuiltinFunctionExpression
public BuiltinFunctionExpression(org.antlr.v4.runtime.ParserRuleContext ctx, Builtins bifop, Expression[] args, String fname)
-
-
Method Detail
-
rewriteExpression
public Expression rewriteExpression(String prefix)
- Overrides:
rewriteExpression
in classDataIdentifier
-
getOpCode
public Builtins getOpCode()
-
getFirstExpr
public Expression getFirstExpr()
-
getSecondExpr
public Expression getSecondExpr()
-
getThirdExpr
public Expression getThirdExpr()
-
getFourthExpr
public Expression getFourthExpr()
-
getFifthExpr
public Expression getFifthExpr()
-
getSixthExpr
public Expression getSixthExpr()
-
getSeventhExpr
public Expression getSeventhExpr()
-
getEighthExpr
public Expression getEighthExpr()
-
getAllExpr
public Expression[] getAllExpr()
-
getExpr
public Expression getExpr(int i)
-
validateExpression
public void validateExpression(MultiAssignmentStatement stmt, HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)
- Overrides:
validateExpression
in classExpression
-
validateExpression
public void validateExpression(HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)
Validate parse tree : Process BuiltinFunction Expression in an assignment statement- Overrides:
validateExpression
in classIdentifier
-
multipleReturns
public boolean multipleReturns()
Description copied from class:DataIdentifier
Method to specify if an expression returns multiple outputs. This method must be overridden by all child classes.- Overrides:
multipleReturns
in classDataIdentifier
- Returns:
- true if expression returns multiple outputs
-
toString
public String toString()
- Overrides:
toString
in classDataIdentifier
-
variablesRead
public VariableSet variablesRead()
- Overrides:
variablesRead
in classDataIdentifier
-
variablesUpdated
public VariableSet variablesUpdated()
- Overrides:
variablesUpdated
in classDataIdentifier
-
getBuiltinFunctionExpression
public static BuiltinFunctionExpression getBuiltinFunctionExpression(org.antlr.v4.runtime.ParserRuleContext ctx, String functionName, ArrayList<ParameterExpression> paramExprsPassed, String filename)
-
getValueTypeCastOperator
public static Builtins getValueTypeCastOperator(Types.ValueType vt)
Convert a value type (double, int, or boolean) to a built-in function operator.- Parameters:
vt
- Value type (ValueType.DOUBLE
,ValueType.INT
, orValueType.BOOLEAN
).- Returns:
- Built-in function operator (
Builtins.AS_DOUBLE
,Builtins.AS_INT
, orBuiltins.AS_BOOLEAN
).
-
-