/** * {@inheritDoc} Creates a new ASTNode object. */ @Override public FunctionNode createFunction( final SymbolNode head ) { return new FunctionNode( head ); }
/** * Creates a new list with no arguments from the given header object . */ public FunctionNode createAST(final ASTNode headExpr) { return new FunctionNode(headExpr); }
@Override public FunctionNode createFunction(final SymbolNode head, final ASTNode arg1, final ASTNode arg2, final ASTNode arg3) { return new FunctionNode(head, arg1, arg2, arg3); }
/** * {@inheritDoc} Creates a new list with no arguments from the given header * object . */ @Override public FunctionNode createAST( final ASTNode headExpr ) { return new FunctionNode( headExpr ); }
/** * {@inheritDoc} Creates a new ASTNode object. */ @Override public FunctionNode createFunction( final SymbolNode head, final ASTNode arg0, final ASTNode arg1 ) { return new FunctionNode( head, arg0, arg1 ); }
/** * {@inheritDoc} Creates a new ASTNode object. */ @Override public FunctionNode createFunction( final SymbolNode head, final ASTNode arg0 ) { return new FunctionNode( head, arg0 ); }
/** * Creates a new list with no arguments from the given header object . */ @Override public FunctionNode createAST(final ASTNode headExpr) { return new FunctionNode(headExpr); }
public FunctionNode createFunction(final SymbolNode head) { return new FunctionNode(head); }
@Override public FunctionNode createFunction(final SymbolNode head) { return new FunctionNode(head); }
@Override public FunctionNode createFunction(final SymbolNode head, final ASTNode arg0) { return new FunctionNode(head, arg0); }
@Override public FunctionNode createFunction(final SymbolNode head, final ASTNode arg1, final ASTNode arg2) { return new FunctionNode(head, arg1, arg2); }
public FunctionNode createFunction(final SymbolNode head, final ASTNode arg0) { return new FunctionNode(head, arg0); }
public FunctionNode createFunction(final SymbolNode head, final ASTNode arg0, final ASTNode arg1) { return new FunctionNode(head, arg0, arg1); }
private ASTNode getDerivativeResult(ASTNode arg1Derived, FunctionNode fun) { if (!arg1Derived.equals(new DoubleNode(1.0))) { FunctionNode res = new FunctionNode(fASTFactory.createSymbol("Times")); res.add(arg1Derived); res.add(fun); return res; } return fun; }
ASTNode arg1Derived = derivative(f.getNode(1), var); if (isSymbol(head, "Exp")) { FunctionNode fun = new FunctionNode(fASTFactory.createSymbol("Exp")); fun.add(f.getNode(1)); return getDerivativeResult(arg1Derived, fun); FunctionNode fun = new FunctionNode(fASTFactory.createSymbol("Times")); fun.add(new DoubleNode(-1.0)); fun.add(new FunctionNode(fASTFactory.createSymbol("Cos"), f.getNode(1))); return getDerivativeResult(arg1Derived, fun); FunctionNode fun = new FunctionNode(fASTFactory.createSymbol("Cos")); fun.add(f.getNode(1)); return getDerivativeResult(arg1Derived, fun); FunctionNode result = new FunctionNode(f.getNode(0)); for (int i = 1; i < f.size(); i++) { ASTNode deriv = derivative(f.getNode(i), var); FunctionNode plusResult = new FunctionNode(fASTFactory.createSymbol("Plus")); for (int i = 1; i < f.size(); i++) { FunctionNode timesResult = new FunctionNode(f.getNode(0)); boolean valid = true; for (int j = 1; j < f.size(); j++) { return new FunctionNode(new SymbolNode("D"), node, var);