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

Modifier and Type
Method
Description
`Expression[]`
`getAllExpr()`
`static BuiltinFunctionExpression`
`getBuiltinFunctionExpression(org.antlr.v4.runtime.ParserRuleContext ctx, String functionName, ArrayList<ParameterExpression> paramExprsPassed, String filename)`
`Expression`
`getEighthExpr()`
`Expression`
`getExpr(int i)`
`Expression`
`getFifthExpr()`
`Expression`
`getFirstExpr()`
`Expression`
`getFourthExpr()`
`Builtins`
`getOpCode()`
`Expression`
`getSecondExpr()`
`Expression`
`getSeventhExpr()`
`Expression`
`getSixthExpr()`
`Expression`
`getThirdExpr()`
`static Builtins`
`getValueTypeCastOperator(Types.ValueType vt)`
Convert a value type (double, int, or boolean) to a built-in function operator.
`boolean`
`multipleReturns()`
Method to specify if an expression returns multiple outputs.
`Expression`
`rewriteExpression(String prefix)`
`String`
`toString()`
`void`
`validateExpression(HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
Validate parse tree : Process BuiltinFunction Expression in an assignment statement
`void`
`validateExpression(MultiAssignmentStatement stmt, HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
`VariableSet`
`variablesRead()`
`VariableSet`
`variablesUpdated()`

### 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, getValueType, isScalarBoolean, setBlocksize, setBooleanProperties, setDataType, setDimensions, setDimensionValueProperties, setFileFormat, setIntProperties, setNnz, 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`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### 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 Details

### rewriteExpression

public Expression rewriteExpression(String prefix)

Overrides:
  `rewriteExpression` in class `DataIdentifier`

### 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 class `Expression`

### 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 class `Identifier`

### 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 class `DataIdentifier`
Returns:
  true if expression returns multiple outputs

### toString

public String toString()

Overrides:
  `toString` in class `DataIdentifier`

### variablesRead

public VariableSet variablesRead()

Overrides:
  `variablesRead` in class `DataIdentifier`

### variablesUpdated

public VariableSet variablesUpdated()

Overrides:
  `variablesUpdated` in class `DataIdentifier`

### 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`, or `ValueType.BOOLEAN`).
Returns:
  Built-in function operator (`Builtins.AS_DOUBLE`, `Builtins.AS_INT`, or `Builtins.AS_BOOLEAN`).