Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.lsmp.djep.djep.diffRules
Class MacroDiffRules

    java.lang.Object
      org.lsmp.djep.djep.diffRules.ChainRuleDiffRules
          org.lsmp.djep.djep.diffRules.MacroDiffRules

All Implemented Interfaces:
  DiffRulesI

    public class MacroDiffRules

extends ChainRuleDiffRules

Rules are specfied by a set of strings or trees of nodes. The standard chain rule is applied

    diff(f(g(x),h(x)),x) -> df/dg dg/dx + df/dh dh/dx

for example

     DifferentiationVisitor dv = new DifferentiationVisitor(new TreeUtils(jep));
     DiffRulesI rule = new MacroDiffRules(dv,"sin","cos(x)");

Field Summary

Fields inherited from class org.lsmp.djep.djep.diffRules.ChainRuleDiffRules
`name, pfmc, rules`

Constructor Summary
`MacroDiffRules(DJep djep, java.lang.String inName, Node node)` Create a differention rule for function with 1 argument
`MacroDiffRules(DJep djep, java.lang.String inName, PostfixMathCommandI inPfmc, java.lang.String rule)` Create a differention rule for function with 1 argument
`MacroDiffRules(DJep djep, java.lang.String inName, PostfixMathCommandI inPfmc, java.lang.String[] inRules)` Create a differentation rule for function with n arguments.
`MacroDiffRules(DJep djep, java.lang.String inName, PostfixMathCommandI inPfmc, java.lang.String rule1, java.lang.String rule2)` Create a differention rule for function with 2 arguments.
`MacroDiffRules(DJep djep, java.lang.String inName, java.lang.String rule)` Create a differention rule for function with 1 argument
`MacroDiffRules(DJep djep, java.lang.String inName, java.lang.String[] inRules)` Create a differentation rule for function with n arguments.
`MacroDiffRules(DJep djep, java.lang.String inName, java.lang.String rule1, java.lang.String rule2)` Create a differention rule for function with 2 arguments.

Method Summary

Methods inherited from class org.lsmp.djep.djep.diffRules.ChainRuleDiffRules
`differentiate, getName, getNumRules, getPfmc, getRule, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          Node node)
                   throws ParseException

  Create a differention rule for function with 1 argument

  Parameters:
    `inName` - name of function
    `node` - a tree represention differation of function wrt "x"
  Throws:
    `ParseException`

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          java.lang.String rule)
                   throws ParseException

  Create a differention rule for function with 1 argument

  Parameters:
    `inName` - name of function
    `rule` - a string represention differation of a function wrt "x"
  Throws:
    `ParseException`

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          PostfixMathCommandI inPfmc,
                          java.lang.String rule)
                   throws ParseException

  Create a differention rule for function with 1 argument

  Parameters:
    `inName` - name of function
    `inPfmc` - PostfixMathCommandI for function
    `rule` - a string represention differation of function wrt "x"
  Throws:
    `ParseException`

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          PostfixMathCommandI inPfmc,
                          java.lang.String rule1,
                          java.lang.String rule2)
                   throws ParseException

  Create a differention rule for function with 2 arguments. The rules must be in terms of "x" and "y"

  Parameters:
    `inName` - name of function
    `inPfmc` - PostfixMathCommandI for function
    `rule1` - a string represention differation of function wrt "x"
    `rule2` - a string represention differation of function wrt "y"
  Throws:
    `ParseException`

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          java.lang.String rule1,
                          java.lang.String rule2)
                   throws ParseException

  Create a differention rule for function with 2 arguments. The rules must be in terms of "x" and "y"

  Parameters:
    `inName` - name of function
    `rule1` - a string represention differation of function wrt "x"
    `rule2` - a string represention differation of function wrt "y"
  Throws:
    `ParseException`

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          PostfixMathCommandI inPfmc,
                          java.lang.String[] inRules)
                   throws ParseException

  Create a differentation rule for function with n arguments. The rules must be in terms of "x1", "x2", ... "xn"

  Parameters:
    `inName` - name of function
    `inPfmc` - PostfixMathCommandI for function
  Throws:
    `ParseException`

### MacroDiffRules

    public MacroDiffRules(DJep djep,
                          java.lang.String inName,
                          java.lang.String[] inRules)
                   throws ParseException

  Create a differentation rule for function with n arguments. The rules must be in terms of "x1", "x2", ... "xn"

  Parameters:
    `inName` - name of function
    `inRules` - an array of strings representation differentation of function wrt "x1",...
  Throws:
    `ParseException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

http://www.singularsys.com/jep Copyright © 2007 Singular Systems