This documentation is compiled for the latest release of Mathos Core Library
Assembly: Mathos (in Mathos.dll) Version: 1.0.5.1 (1.0.5.1)
Checks whether the given sequence contains a pattern. For a pattern to exist, given the terms in the sequence, we should be able to reach a difference of zero for all possible values of degree. Degree is dependent on the number of terms we have.
Namespace: Mathos.Calculus
Assembly: Mathos (in Mathos.dll) Version: 1.0.5.1 (1.0.5.1)
Syntax
public static bool HasPattern( double[] sequence, out int degree, bool checkAllTerms = false )
Parameters
- sequence
- Type: SystemDouble
The sequence of doubles passed in as a double array. - degree
- Type: SystemInt32
The degree value returned here is the number of times we have to take the differnce of this sequence (using GetDifference) to get the difference to be zero. - checkAllTerms (Optional)
- Type: SystemBoolean
By default, we only check if we can get any kind of difference (of different degrees) to be zero for the smallest term. If this option is true, all terms are going to be checked to follow the pattern.
Return Value
Type: BooleanSee Also