An NDoc Documented Class Library

PowerSeries Class

This class provides the means to evaluate infinite power series.

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

System.Object
   numerics4net.IterativeMethod
      numerics4net.series.PowerSeries

public class PowerSeries : 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. For example, this is the series for the exponential function defined by (2):

double ExponentialTerm(int n) {
    return 1.0 / Factorial(n);
}

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

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

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

Requirements

Namespace: numerics4net.series

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

See Also

PowerSeries Members | numerics4net.series Namespace