Documentation API of the 'jhplot.math.num.Series' Java class
Series
jhplot.math.num

## Class Series

• `public abstract class Seriesextends IterativeMethod`

This class provides the means to evaluate infinite series (1). To create a series, authors subclass this class and provided a concrete term method. Of note, when evaluating a series, the term indicies are the nonnegative integers. That is to say, the first term is at index zero and each subsequent term increases the index by one. It is the responsibility of the author to shift term indices as needed if a series does not start at zero or if the indices are not unit increments.

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

` Series exponential = new Series() {     public double getTerm(int n, double x) {         return Math.pow(x, n) / factorial(n);     }      private double factorial(int n) {         double p = 1.0;         while(n > 1.0) {             p *= n--;         }         return p;     } } `

References:

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

• ### 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 1.2 © DataMelt by jWork.ORG

Series
jhplot.math.num

## Class Series

• `public abstract class Seriesextends IterativeMethod`

This class provides the means to evaluate infinite series (1). To create a series, authors subclass this class and provided a concrete term method. Of note, when evaluating a series, the term indicies are the nonnegative integers. That is to say, the first term is at index zero and each subsequent term increases the index by one. It is the responsibility of the author to shift term indices as needed if a series does not start at zero or if the indices are not unit increments.

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

` Series exponential = new Series() {     public double getTerm(int n, double x) {         return Math.pow(x, n) / factorial(n);     }      private double factorial(int n) {         double p = 1.0;         while(n > 1.0) {             p *= n--;         }         return p;     } } `

References:

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

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.