Module dlib.math.combinatorics

Combinatorics

Functions

NameDescription
combinations(objects, taken) Compute the number of combinations of objects types of items when considered taken at a time, where order is ignored
doubleFactorial(n) Computes the double factorial of n: n * (n - 2) * (n - 4) * ... * 1
factorial(n) Returns the factorial of n
fibonacci(n) Computes the nth fibonacci number
hyperFactorial(n) Computes the hyperfactorial of n: 1^1 * 2^2 * 3^3 * ... n^n
lucas(n) Computes the nth Lucas number
permutations(objects, taken) Compute the number of permutations of objects types of items when considered taken at a time, where order is considered

Aliases

NameTypeDescription
C combinations Common vernacular for combinations
choose combinations Common vernacular for combinations
fib fibonacci Common vernacular for fibonacci