Interface DerivativeExpressionNode

All Superinterfaces:
ASTNode, ExpressionNode, ForLoopInitializerNode, InitializerNode, SizeableNode

public interface DerivativeExpressionNode extends ExpressionNode
A CIVL-C derivative expression is a function call to the partial derivative of an abstract function. It comprises a set of parameter-integer pairs which encode the differential operator being applied to the function, and the sequence of actual parameters which are the inputs to the resulting function.
  • Method Details

    • getFunction

      ExpressionNode getFunction()
      The abstract function whose derivative is being taken.
      Returns:
      The abstract function.
    • getNumberOfArguments

      int getNumberOfArguments()
      Returns the number of actual arguments occurring in this derivative expression.
      Returns:
      The number of actual arguments.
    • getArgument

      ExpressionNode getArgument(int index)
      Returns the index-th argument, indexed from 0.
      Returns:
      argument at position index, indexed from 0
    • getNumberOfPartials

      int getNumberOfPartials()
      Computes the number of parameters which have at least one partial derivative taken. Note that each parameter may have a partial taken more than once (e.g. $D[rho,{x,3},{y,2}], so this is not the same thing as the total times a partial derivative is taken. That is, for $D[rho,{x,3},{y,2}], this returns 2, not 5.
      Returns:
      the number of parameters that have a partial of degree at least 1
    • getPartial

      Returns the (identifier, int) pair at the specified index in the list of partial derivatives.
      Returns:
      the identifier-int pair at position index, indexed from 0
    • copy

      Description copied from interface: ASTNode
      Returns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.
      Specified by:
      copy in interface ASTNode
      Specified by:
      copy in interface ExpressionNode
      Specified by:
      copy in interface ForLoopInitializerNode
      Specified by:
      copy in interface InitializerNode
      Specified by:
      copy in interface SizeableNode
      Returns:
      deep copy of this node