Skip to content

Add support for the combinatoric operators "comb" and "perm"

Stephen Swanson requested to merge archwizard/analitza:master into master

This library does not support two common combinatorics functions: choose1 and permutation2. This merge request adds those to this library using the same syntax as Qalc, comb(n,r) and perm(n,k).

I'm not a seasoned C++ developer, but I think the code works, and I tried to follow the format of the gcd operator.

Let me know if there are any questions or concerns.

  1. https://en.wikipedia.org/wiki/Combination

  2. https://en.wikipedia.org/wiki/Permutation#k-permutations_of_n

Merge request reports