DataSharp/Mathematics/CombinationHelper.cs
/// <summary>
/// Returns true if the caller can generate next combination, false otherwise.
/// </summary>
/// <param name="combination">The current combination.</param>
/// <param name="numSelection">The number of elements to be extracted.</param>
/// <returns>Returns true if the caller can generate next combination, false otherwise.</returns>
Returns true if the caller can generate next combination, false otherwise.
Returns true if the caller can generate next combination false otherwise .
private static bool HasNextCombination(int[] combination, int numSelection)
        {
            for (int i = 0; i < combination.Length - numSelection; i++)
            {
                if (combination[i] == 1)
                    return true;
            }
            return false;
        }
private static bool HasNextCombination ( int [ ] combination , int numSelection ) { for ( int i = 0 ; i < combination . Length - numSelection ; i ++ ) { if ( combination [ i ] == 1 ) return true ; } return false ; }
Returns true if the caller can generate next combination, false otherwise.
Returns true if the caller can generate next combination false otherwise .
Returns true if the caller can generate next combination, false otherwise.
Returns true if the caller can generate next combination false otherwise .
combination
int[]
The current combination.
The current combination .
numSelection
int
The number of elements to be extracted.
The number of elements to be extracted .