Class Differentiable

java.lang.Object
math.differentialcalculus.Differentiable

public class Differentiable extends Object
Anything that can be mathematically differentiated.. e.g a number, a variable or an expression.
  • Field Details

    • name

      private String name
      The representation of the Differentiable.
    • data

      private ArrayList<String> data
      The information contained by the Differentiable.
  • Constructor Details

    • Differentiable

      public Differentiable(String name)
      Parameters:
      name - The representation of the Differentiable.
    • Differentiable

      public Differentiable(String name, ArrayList<String> data)
      Parameters:
      name - The representation of the Differentiable.
      data - The information contained by the Differentiable.
  • Method Details

    • isChain

      public boolean isChain()
      Returns:
      true if this name is automatically generated.. which implies that it was created to represent a Differentiable that is a part of the differentiation chain.
    • setName

      public void setName(String name)
    • getName

      public String getName()
    • setData

      public void setData(ArrayList<String> data)
    • getData

      public ArrayList<String> getData()
    • simplifyDerivedData

      public void simplifyDerivedData(ArrayList<String> derivedData)
      Simplifies the contents of the derivedData ArrayList.
      Parameters:
      derivedData -
    • differentiate

      public ArrayList<String> differentiate(Derivative d)
      Parameters:
      d - The parent Derivative object.
      Returns:
      the List containing the tokens of the derivative.
    • getDerivativeExpression

      public String getDerivativeExpression(ArrayList<String> derivedData)
      Parameters:
      derivedData -
      Returns:
      the derivative as a String object.
    • getExpression

      public String getExpression()
      Returns:
      The string format of the data.