## org.jscience.mathematics.analysis Class DoubleFunction

```java.lang.Object
org.jscience.mathematics.analysis.DoubleFunction
```
All Implemented Interfaces:
java.io.Serializable, Field.Member, Ring.Member, AbelianGroup.Member, AbstractMapping, C1Function, PrimitiveMapping, Member
Direct Known Subclasses:
ConstantDoubleFunction, DoublePolynomial, DoublePolynomialFraction, ExponentialDoubleFunction, IdentityDoubleFunction, LinearDoubleFunction

`public abstract class DoubleFunctionextends java.lang.Objectimplements PrimitiveMapping, C1Function, Field.Member`

This class describes a function on the real numbers.

Serialized Form

Constructor Summary
`DoubleFunction()`

Method Summary
` AbelianGroup.Member` `add(AbelianGroup.Member f)`
Returns the addition of this function and another.
` DoubleFunction` `add(DoubleFunction f)`
DOCUMENT ME!
` DoubleFunction` `compose(DoubleFunction f)`
DOCUMENT ME!
` Field.Member` `cos()`
Returns the cosine of this function.
`abstract  DoubleFunction` `differentiate()`
Returns the differential of this function.
` DoubleFunction` `divide(DoubleFunction f)`
DOCUMENT ME!
` Field.Member` `divide(Field.Member f)`
Returns the quotient of this function and another.
` Field.Member` `exp()`
Returns the exp of this function.
` IntervalsList` `getIntervalsList()`
DOCUMENT ME!
` Field.Member` `inverse()`
Returns this function inverse.
` Field.Member` `log()`
Returns the log of this function (actually the ln, see java.lang.Math).
`abstract  double` `map(double x)`
DOCUMENT ME!
` double` `map(float x)`
Evaluates this function.
` double` `map(int x)`
Evaluates this function.
` double` `map(long x)`
Evaluates this function.
` DoubleFunction` `multiply(DoubleFunction f)`
DOCUMENT ME!
` Ring.Member` `multiply(Ring.Member f)`
Returns the multiplication of this function and another.
` AbelianGroup.Member` `negate()`
Returns the negative of this function.
` Field.Member` `power(double d)`
Returns this function raised to a power.
` void` `setIntervalsList(IntervalsList list)`
DOCUMENT ME!
` Field.Member` `sin()`
Returns the sine of this function.
` Field.Member` `sqrt()`
Returns the sqrt of this function.
` AbelianGroup.Member` `subtract(AbelianGroup.Member f)`
Returns the subtraction of this function and another.
` DoubleFunction` `subtract(DoubleFunction f)`
DOCUMENT ME!
` DoublePolynomial` ```taylorExpand(double a, int n)```
Returns the Taylor expansion of this function about a point.
` DoubleFunction2D` `tensor(DoubleFunction f)`
DOCUMENT ME!

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DoubleFunction

`public DoubleFunction()`
Method Detail

### map

`public abstract double map(double x)`
DOCUMENT ME!

Specified by:
`map` in interface `PrimitiveMapping`
Parameters:
`x` - DOCUMENT ME!
Returns:
DOCUMENT ME!
`org.jscience.mathematics.analysis.IntervalList.`

### differentiate

`public abstract DoubleFunction differentiate()`
Returns the differential of this function.

Specified by:
`differentiate` in interface `C1Function`
Returns:
DOCUMENT ME!

### map

`public double map(float x)`
Evaluates this function.

Specified by:
`map` in interface `PrimitiveMapping`
Parameters:
`x` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### map

`public double map(long x)`
Evaluates this function.

Specified by:
`map` in interface `PrimitiveMapping`
Parameters:
`x` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### map

`public double map(int x)`
Evaluates this function.

Specified by:
`map` in interface `PrimitiveMapping`
Parameters:
`x` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### getIntervalsList

`public IntervalsList getIntervalsList()`
DOCUMENT ME!

Returns:
DOCUMENT ME!

### setIntervalsList

`public void setIntervalsList(IntervalsList list)`
DOCUMENT ME!

Parameters:
`list` - DOCUMENT ME!

### compose

`public DoubleFunction compose(DoubleFunction f)`
DOCUMENT ME!

Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### negate

`public AbelianGroup.Member negate()`
Returns the negative of this function.

Specified by:
`negate` in interface `AbelianGroup.Member`
Returns:
DOCUMENT ME!

`public AbelianGroup.Member add(AbelianGroup.Member f)`
Returns the addition of this function and another.

Specified by:
`add` in interface `AbelianGroup.Member`
Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
`java.lang.IllegalArgumentException` - DOCUMENT ME!

`public DoubleFunction add(DoubleFunction f)`
DOCUMENT ME!

Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### subtract

`public AbelianGroup.Member subtract(AbelianGroup.Member f)`
Returns the subtraction of this function and another.

Specified by:
`subtract` in interface `AbelianGroup.Member`
Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
`java.lang.IllegalArgumentException` - DOCUMENT ME!

### subtract

`public DoubleFunction subtract(DoubleFunction f)`
DOCUMENT ME!

Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### multiply

`public Ring.Member multiply(Ring.Member f)`
Returns the multiplication of this function and another.

Specified by:
`multiply` in interface `Ring.Member`
Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
`java.lang.IllegalArgumentException` - DOCUMENT ME!

### multiply

`public DoubleFunction multiply(DoubleFunction f)`
DOCUMENT ME!

Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### inverse

`public Field.Member inverse()`
Returns this function inverse.

Specified by:
`inverse` in interface `Field.Member`
Returns:
DOCUMENT ME!

### divide

`public Field.Member divide(Field.Member f)`
Returns the quotient of this function and another.

Specified by:
`divide` in interface `Field.Member`
Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
`java.lang.IllegalArgumentException` - DOCUMENT ME!

### divide

`public DoubleFunction divide(DoubleFunction f)`
DOCUMENT ME!

Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### power

`public Field.Member power(double d)`
Returns this function raised to a power.

Parameters:
`d` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### cos

`public Field.Member cos()`
Returns the cosine of this function.

Returns:
DOCUMENT ME!

### sin

`public Field.Member sin()`
Returns the sine of this function.

Returns:
DOCUMENT ME!

### log

`public Field.Member log()`
Returns the log of this function (actually the ln, see java.lang.Math).

Returns:
DOCUMENT ME!

### exp

`public Field.Member exp()`
Returns the exp of this function.

Returns:
DOCUMENT ME!

### sqrt

`public Field.Member sqrt()`
Returns the sqrt of this function.

Returns:
DOCUMENT ME!

### tensor

`public DoubleFunction2D tensor(DoubleFunction f)`
DOCUMENT ME!

Parameters:
`f` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### taylorExpand

```public DoublePolynomial taylorExpand(double a,
int n)```
Returns the Taylor expansion of this function about a point.

Parameters:
`a` - the point at which to expand about.
`n` - the number of terms to expand to.
Returns:
the Taylor series of f(x+a).