Libraries: Combinatorics

 

Combinatorics:

Initial library of combinatorics functions.

Author: Dennis Kirichenko

 
Automated-Trading:

Combinatorics:

Author: Dennis Kirichenko

Very Basic 

Thanks for the upload. I like it a lot

 

The library cannot work with large samples, even 200 units for 3 groups cannot be calculated by the function

double combination(int N,int k)
  {
   int nCombs;
   nCombs=factorial(N)/(factorial(k)*factorial(N-k));
   //Print(factorial(N));
   return nCombs;
  }

And it is not clear, the function is of type double, but returns the value of int variable.

Is there any possibility to get the value in each group by combination number without a loop of continuous enumeration?