Documentation of 'jhplot.math.Symbolic' Java class.
Symbolic
jhplot.math

Class Symbolic



  • public class Symbolic
    extends java.lang.Object
    Symbolic calculations. Select the symbolic engine, such as "jasymca" (default), "jscl" or "symja". Read the manual for the description.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Symbolic()
      Initialize symbolic calculations using jasymca as the main engine.
      Symbolic(java.lang.String engine)
      Set engine for symbolic calculations.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String derivative(java.lang.String s)
      Symbolic derivative.
      java.lang.String elementary(java.lang.String s)
      Rewrite an expression in term of elementary functions (log, exp, frac, sqrt, implicit roots).
      java.lang.String eval(java.lang.String str)
      Evaluate an expression with the given engine.
      void exec(java.lang.String str)
      Execute a set of expressions.
      java.lang.String expand(java.lang.String s)
      Expanding a math formula.
      java.lang.String factorize(java.lang.String s)
      Factorize math formula.
      java.lang.Object getEngine()
      Return the symbolic engine.
      java.lang.String getEngineName()
      Return the name of the current engine.
      java.lang.String numeric(java.lang.String s)
      Evaluate numerical values and perform some substitutions.
      java.lang.String simplify(java.lang.String s)
      Simplify equation.
      java.lang.String toJava(java.lang.String s)
      Convert math equation to Java code
      java.lang.String toMathML(java.lang.String s)
      Convert an equation to MathML form.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Symbolic

        public Symbolic(java.lang.String engine)
        Set engine for symbolic calculations. This can be either "jasymca", "jscl" or "symja"
        Parameters:
        engine - engine type. Can be "jasymc", "jscl" or "symja".
      • Symbolic

        public Symbolic()
        Initialize symbolic calculations using jasymca as the main engine.
    • Method Detail

      • getEngineName

        public java.lang.String getEngineName()
        Return the name of the current engine.
        Returns:
        current engine.
      • getEngine

        public java.lang.Object getEngine()
        Return the symbolic engine.
        Returns:
        Symbolic engine or null
      • eval

        public java.lang.String eval(java.lang.String str)
                              throws java.lang.Exception
        Evaluate an expression with the given engine. For "jasymca", use the standard Matlab/Octave mode. For "jscl", use jscl syntax.
        Parameters:
        str - string for evaluation.
        Returns:
        Throws:
        java.lang.Exception
      • exec

        public void exec(java.lang.String str)
                  throws java.lang.Exception
        Execute a set of expressions. This uses always jasymca mode (Octave/Matlab) syntax.
        Parameters:
        str - string for evaluation
        Throws:
        java.lang.Exception
      • toJava

        public java.lang.String toJava(java.lang.String s)
                                throws jscl.text.ParseException
        Convert math equation to Java code
        Parameters:
        s - input equation
        Returns:
        result
        Throws:
        jscl.text.ParseException
      • toMathML

        public java.lang.String toMathML(java.lang.String s)
                                  throws jscl.text.ParseException
        Convert an equation to MathML form.
        Parameters:
        s - input equation
        Returns:
        result
        Throws:
        jscl.text.ParseException
      • expand

        public java.lang.String expand(java.lang.String s)
                                throws jscl.text.ParseException
        Expanding a math formula. This uses "jscl" engine.
        Parameters:
        s - input equation
        Returns:
        math equation after evaluation
        Throws:
        jscl.text.ParseException
      • factorize

        public java.lang.String factorize(java.lang.String s)
                                   throws jscl.text.ParseException
        Factorize math formula. This uses "jscl" engine.
        Parameters:
        s - input equation
        Returns:
        after factorization.
        Throws:
        jscl.text.ParseException
      • elementary

        public java.lang.String elementary(java.lang.String s)
                                    throws jscl.text.ParseException
        Rewrite an expression in term of elementary functions (log, exp, frac, sqrt, implicit roots). This uses "jscl" engine.
        Parameters:
        s - input equation
        Returns:
        result
        Throws:
        jscl.text.ParseException
      • simplify

        public java.lang.String simplify(java.lang.String s)
                                  throws jscl.text.ParseException
        Simplify equation. It is often useful to rewrite an expression in term of elementary functions, i.e calling "elementary" first. This uses "jscl" engine.
        Parameters:
        s - input equation
        Returns:
        result
        Throws:
        jscl.text.ParseException
      • numeric

        public java.lang.String numeric(java.lang.String s)
                                 throws jscl.text.ParseException
        Evaluate numerical values and perform some substitutions. This uses "jscl" engine.
        Parameters:
        s -
        Returns:
        result
        Throws:
        jscl.text.ParseException
      • derivative

        public static java.lang.String derivative(java.lang.String s)
                                           throws jscl.text.ParseException
        Symbolic derivative. This uses "jscl" engine.
        Parameters:
        s -
        Returns:
        result
        Throws:
        jscl.text.ParseException

DMelt 3.0 © DataMelt by jWork.ORG