An NDoc Documented Class Library

Series Class

This class provides the means to evaluate infinite series.

For a list of all members of this type, see Series Members.

System.Object
   numerics4net.IterativeMethod
      numerics4net.series.Series

public class Series : IterativeMethod

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

To create a series, authors provided a term delegate 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):

double ExponentialTerm(int n, double x) {
    return Math.Pow(x, n) / Factorial(n);
}

double Factorial(int n) {
    double p = 1.0;
    while(n > 1.0) {
        p *= n--;
    }
}

Series exponential = new Series(new Series.Term(ExponentialTerm));
double e = exponential.Evaluate(1.0);
double eSquared = exponential.Evaluate(2.0);

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

Requirements

Namespace: numerics4net.series

Assembly: numerics4net-1.2 (in numerics4net-1.2.dll)

See Also

Series Members | numerics4net.series Namespace