jsci.maths.symbolic
Class Function

java.lang.Object
  extended by jsci.maths.symbolic.Expression
      extended by jsci.maths.symbolic.Function
All Implemented Interfaces:
Serializable, Field.Member, Ring.Member, AbelianGroup.Member, Member

public class Function
extends Expression

A function like sin(x), exp(x) or sqrt(x).
This will be substituted by Evaluation.

See Also:
Serialized Form

Field Summary
static String ACOS
           
static String ACOSH
           
static String ASIN
           
static String ASINH
           
static String ATAN
           
static String ATANH
           
static String COS
           
static String COSH
           
static String EXP
           
static String LOG
           
static String SIN
           
static String SINH
           
static String SQRT
           
static String TAN
           
static String TANH
           
 
Constructor Summary
Function(String n, Expression a)
           
 
Method Summary
 Expression differentiate(Variable x)
          Differentiation of the expression with respect to a variable
 boolean equals(Object o)
           
 Expression evaluate()
          This method substitutes the variable with the variable values, if non-null; they can be Contants or other Expressions.
 int getPriority()
          Get the priority of the operator described by the expression.
 Object getSet()
           
 String toString()
           
 
Methods inherited from class jsci.maths.symbolic.Expression
add, difference, differentiate, divide, divide, inverse, inverse, main, multiply, negate, negative, power, product, product, rise, subtract, sum, sum
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIN

public static final String SIN
See Also:
Constant Field Values

COS

public static final String COS
See Also:
Constant Field Values

TAN

public static final String TAN
See Also:
Constant Field Values

ASIN

public static final String ASIN
See Also:
Constant Field Values

ACOS

public static final String ACOS
See Also:
Constant Field Values

ATAN

public static final String ATAN
See Also:
Constant Field Values

SINH

public static final String SINH
See Also:
Constant Field Values

COSH

public static final String COSH
See Also:
Constant Field Values

TANH

public static final String TANH
See Also:
Constant Field Values

ASINH

public static final String ASINH
See Also:
Constant Field Values

ACOSH

public static final String ACOSH
See Also:
Constant Field Values

ATANH

public static final String ATANH
See Also:
Constant Field Values

EXP

public static final String EXP
See Also:
Constant Field Values

LOG

public static final String LOG
See Also:
Constant Field Values

SQRT

public static final String SQRT
See Also:
Constant Field Values
Constructor Detail

Function

public Function(String n,
                Expression a)
Parameters:
n - the name (type) of the function; for example, Function.SIN
a - the argument
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getPriority

public int getPriority()
Description copied from class: Expression
Get the priority of the operator described by the expression. This is needed only for allowing toString() to generate the parenthesis when needed.

Returns:
the priority

differentiate

public Expression differentiate(Variable x)
Description copied from class: Expression
Differentiation of the expression with respect to a variable

Specified by:
differentiate in class Expression
Parameters:
x - the variable

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getSet

public Object getSet()

evaluate

public Expression evaluate()
Description copied from class: Expression
This method substitutes the variable with the variable values, if non-null; they can be Contants or other Expressions. Simplification is performed.

Specified by:
evaluate in class Expression
Returns:
the evaluated Expression. Can be a Constant.


jHepWork 3.1 ©