Class Series
Contains functions for enumerating mathematical series.
Inherited Members
Namespace: TheXDS.MCART.Math
Assembly: MCART.dll
Syntax
public static class Series
Methods
| Edit this page View SourceFibonacci()
Exposes an enumerator that contains the complete Fibonacci sequence.
Declaration
public static IEnumerable<long> Fibonacci()
Returns
Type | Description |
---|---|
IEnumerable<long> | An IEnumerable<T> with the infinite Fibonacci sequence. |
Remarks
Series utilize enumerators to expose complete series in an
infinite manner. It is important to note that improper use of
these functions can lead to overflow or stack errors, or the
program may become unresponsive for an extended period.
All infinite enumeration functions should be used in conjunction
with the extension method
System.Linq.Enumerable.Take<TSource>(IEnumerable<TSource>, int)
See Also
Lucas()
Exposes an enumerator that contains the complete Lucas sequence.
Declaration
public static IEnumerable<long> Lucas()
Returns
Type | Description |
---|---|
IEnumerable<long> | An IEnumerable<T> with the infinite Lucas sequence. |
Remarks
Series utilize enumerators to expose complete series in an
infinite manner. It is important to note that improper use of
these functions can lead to overflow or stack errors, or the
program may become unresponsive for an extended period.
All infinite enumeration functions should be used in conjunction
with the extension method
System.Linq.Enumerable.Take<TSource>(IEnumerable<TSource>, int)
See Also
MakeSeriesAdditive(long, long)
Creates an enumerator that generates an additive numerical series by providing the two initial elements of the series.
Declaration
public static IEnumerable<long> MakeSeriesAdditive(long a, long b)
Parameters
Type | Name | Description |
---|---|---|
long | a | First initial element. |
long | b | Second initial element. |
Returns
Type | Description |
---|---|
IEnumerable<long> | An enumerator that will generate an additive numerical series for each iteration. |
Remarks
Series utilize enumerators to expose complete series in an
infinite manner. It is important to note that improper use of
these functions can lead to overflow or stack errors, or the
program may become unresponsive for an extended period.
All infinite enumeration functions should be used in conjunction
with the extension method
System.Linq.Enumerable.Take<TSource>(IEnumerable<TSource>, int)