Class PartialDerivative

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Observer

    public class PartialDerivative
    extends DVariable
    implements java.util.Observer
    Contains information about a PartialDerivative of a variable.
    Author:
    Rich Morris Created on 29-Oct-2003
    See Also:
    Serialized Form
    • Constructor Detail

      • PartialDerivative

        protected PartialDerivative​(DVariable var,
                                    java.lang.String[] derivnames)
        Protected constructor, should only be constructed through the findDerivative method in DVariable.
      • PartialDerivative

        protected PartialDerivative​(DVariable var,
                                    java.lang.String[] derivnames,
                                    Node deriv)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from class: Variable
        Returns the variable name.
        Overrides:
        getName in class Variable
        Returns:
        the variable name.
      • getRoot

        public DVariable getRoot()
        Every partial derivative has a root variable for instance the root variable of dy/dx is y. This method returns than variable.
      • getDnames

        public java.lang.String[] getDnames()
      • toString

        public java.lang.String toString()
        Description copied from class: XVariable
        Returns a string rep of variable with its equation and value.
        Overrides:
        toString in class XVariable
        Returns:
        A string with the variable name and value.
      • update

        public void update​(java.util.Observable arg0,
                           java.lang.Object arg1)
        When the value of the root object is changed makes the value of this partial derivative invalid.
        Specified by:
        update in interface java.util.Observer
        See Also:
        Observer.update(java.util.Observable, java.lang.Object)