org.jscience.mathematics.analysis.expressions
Class Constant

java.lang.Object
  extended by org.jscience.mathematics.analysis.expressions.DataExpression
      extended by org.jscience.mathematics.analysis.expressions.Constant
All Implemented Interfaces:
java.io.Serializable, Expression, NumericalDifferentiable, JavaExpressible, XMLExpressible

public class Constant
extends DataExpression
implements NumericalDifferentiable

Class representing a Constant object.

See Also:
Expression, DataExpression, Variable, Parameter, Serialized Form

Field Summary
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.DataExpression
value
 
Constructor Summary
Constant(double x)
          Creates a Constant object.
 
Method Summary
 java.lang.Object clone()
          DOCUMENT ME!
 Expression diff(NamedDataExpression x)
          DOCUMENT ME!
 boolean equals(java.lang.Object e)
          DOCUMENT ME!
 double numDiff(int i)
          DOCUMENT ME!
 double numEval()
          DOCUMENT ME!
 Expression optimize()
          DOCUMENT ME!
 Expression replace(Expression a, Expression b)
          DOCUMENT ME!
 void resetNumDiff(int i)
          DOCUMENT ME!
 void resetNumEval()
          DOCUMENT ME!
 void setIndex(int i)
          DOCUMENT ME!
 void setNumberOfIndependents(int n)
          DOCUMENT ME!
 java.lang.String toJava()
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 java.lang.String toTaylorMap()
          DOCUMENT ME!
 java.lang.String toXML()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.mathematics.analysis.expressions.DataExpression
contains, eval, factor, getElements, isDifferentiable, isExpandable, isolate, isolate, setValue
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Constant

public Constant(double x)
Creates a Constant object.

Parameters:
x - The value the Constant object should have.
Since:
1.0
Method Detail

diff

public Expression diff(NamedDataExpression x)
DOCUMENT ME!

Specified by:
diff in interface Expression
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

numDiff

public double numDiff(int i)
DOCUMENT ME!

Specified by:
numDiff in interface NumericalDifferentiable
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

setIndex

public void setIndex(int i)
DOCUMENT ME!

Specified by:
setIndex in interface NumericalDifferentiable
Parameters:
i - DOCUMENT ME!

setNumberOfIndependents

public void setNumberOfIndependents(int n)
DOCUMENT ME!

Specified by:
setNumberOfIndependents in interface NumericalDifferentiable
Parameters:
n - DOCUMENT ME!

resetNumDiff

public void resetNumDiff(int i)
DOCUMENT ME!

Specified by:
resetNumDiff in interface NumericalDifferentiable
Parameters:
i - DOCUMENT ME!

numEval

public double numEval()
DOCUMENT ME!

Specified by:
numEval in interface NumericalDifferentiable
Returns:
DOCUMENT ME!

resetNumEval

public void resetNumEval()
DOCUMENT ME!

Specified by:
resetNumEval in interface NumericalDifferentiable

replace

public Expression replace(Expression a,
                          Expression b)
DOCUMENT ME!

Specified by:
replace in interface Expression
Parameters:
a - DOCUMENT ME!
b - DOCUMENT ME!
Returns:
DOCUMENT ME!

optimize

public Expression optimize()
DOCUMENT ME!

Specified by:
optimize in interface Expression
Returns:
DOCUMENT ME!

equals

public boolean equals(java.lang.Object e)
DOCUMENT ME!

Overrides:
equals in class java.lang.Object
Parameters:
e - DOCUMENT ME!
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
DOCUMENT ME!

Overrides:
clone in class java.lang.Object
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

toJava

public java.lang.String toJava()
DOCUMENT ME!

Specified by:
toJava in interface Expression
Specified by:
toJava in interface JavaExpressible
Returns:
DOCUMENT ME!

toTaylorMap

public java.lang.String toTaylorMap()
DOCUMENT ME!

Specified by:
toTaylorMap in interface Expression
Returns:
DOCUMENT ME!

toXML

public java.lang.String toXML()
DOCUMENT ME!

Specified by:
toXML in interface Expression
Specified by:
toXML in interface XMLExpressible
Returns:
DOCUMENT ME!