@Override public IExpr evaluate(final IAST ast) { Validate.checkSize(ast, 2); if (ast.get(1).isAST()) { return ast.get(1).replaceRepeated(REPLACE_RULES); } return ast.get(1); }
@Override public IExpr numericEval(final IAST functionList) { Validate.checkSize(functionList, 2); if (functionList.get(1) instanceof Num) { return numericEvalD1((Num) functionList.get(1)); } if (functionList.get(1) instanceof ComplexNum) { return numericEvalDC1((ComplexNum) functionList.get(1)); } return numericEvalArg1(functionList.get(1)); }
public IExpr evaluate(final IAST ast) { Validate.checkSize(ast, 3); if (ast.get(1).isSymbol()) { if (ast.get(2).isAST("Blank")) { IAST blank = (IAST) ast.get(2); if (blank.size() == 1) { return F.$p((ISymbol) ast.get(1)); } if (blank.size() == 2) { return F.$p((ISymbol) ast.get(1), blank.get(1)); } } if (ast.get(2).isPattern()) { IPattern blank = (IPattern) ast.get(2); if (blank.isBlank()) { return F.$p((ISymbol) ast.get(1), blank.getCondition()); } } } return null; }
@Override public IExpr evaluate(final IAST ast) { Validate.checkSize(ast, 2); return evaluateArg1(ast.get(1)); }