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 static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
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:
Namespace: numerics4net.series
Assembly: numerics4net-1.2 (in numerics4net-1.2.dll)