API documentation of the 'jhplot.math.num.PowerSeries' Java class
PowerSeries
jhplot.math.num

PowerSeries
jhplot.math.num

Class PowerSeries

• `public abstract class PowerSeriesextends IterativeMethod`

This class provides the means to evaluate infinite power series (1). To create a power series, authors subclass this class and provided a concrete term method.

For example, this is the power series for the exponential function defined by (2):

` PowerSeries exponential = new PowerSeries() {     public double getTerm(int n) {         return 1.0 / factorial(n);     }      private double factorial(int n) {         double p = 1.0;         while(n > 1.0) {             p *= n--;         }         return p;     } } `

References:

1. Eric W. Weisstein. "Power Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/PowerSeries.html
2. Exponential Function: Series Representation. http://functions.wolfram.com/01.03.06.0002.01

Since:
1.1

• Nested classes/interfaces inherited from class jhplot.math.num.IterativeMethod

`IterativeMethod.IterativeState`
• Method Summary

All Methods
Modifier and TypeMethod and Description
`double``evaluate(double x)`
Evaluate this series at the given value.
• Methods inherited from class jhplot.math.num.IterativeMethod

`getMaximumIterations, getMaximumRelativeError, iterate, setMaximumIterations, setMaximumRelativeError`
• Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• Method Detail

• evaluate

`public double evaluate(double x)                throws NumericException`
Evaluate this series at the given value.
Parameters:
`x` - the point of evalutation.
Returns:
the value of this series evaluated at x.
Throws:
`NumericException` - if the series could not be evaluated.

DMelt 2.0 © DataMelt by jWork.ORG