11"use strict" ;
22Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3- exports . CartesianProduct = exports . PowerSet = exports . BaseN = exports . Combination = exports . Permutation = exports . randomInteger = exports . combinadic = exports . factoradic = exports . factorial = exports . combination = exports . permutation = exports . version = void 0 ;
3+ exports . CartesianProduct = exports . PowerSet = exports . BaseN = exports . Combination = exports . Permutation = exports . version = void 0 ;
4+ exports . permutation = permutation ;
5+ exports . combination = combination ;
6+ exports . factorial = factorial ;
7+ exports . factoradic = factoradic ;
8+ exports . combinadic = combinadic ;
9+ exports . randomInteger = randomInteger ;
410/**
511 * combinatorics.js
612 *
@@ -35,7 +41,6 @@ function permutation(n, k) {
3541 bp *= bn -- ;
3642 return bp ;
3743}
38- exports . permutation = permutation ;
3944/**
4045 * calculates `C(n, k)`.
4146 *
@@ -50,7 +55,6 @@ function combination(n, k) {
5055 return 0n ;
5156 return permutation ( n , k ) / permutation ( k , k ) ;
5257}
53- exports . combination = combination ;
5458/**
5559 * calculates `n!` === `P(n, n)`.
5660 *
@@ -59,7 +63,6 @@ exports.combination = combination;
5963function factorial ( n ) {
6064 return permutation ( n , n ) ;
6165}
62- exports . factorial = factorial ;
6366/**
6467 * returns the factoradic representation of `n`, least significant order.
6568 *
@@ -86,7 +89,6 @@ function factoradic(n, l = 0) {
8689 }
8790 return digits ;
8891}
89- exports . factoradic = factoradic ;
9092/**
9193 * `combinadic(n, k)` returns a function
9294 * that takes `m` as an argument and
@@ -114,7 +116,6 @@ function combinadic(n, k) {
114116 return digits ;
115117 } ;
116118}
117- exports . combinadic = combinadic ;
118119/**
119120 *
120121 */
@@ -150,7 +151,6 @@ function randomInteger(min = 0, max = Math.pow(2, 53)) {
150151 const rnd = u8s . reduce ( ( a , v ) => ( ( a << ctor ( 8 ) ) + ctor ( v ) ) , ctor ( 0 ) ) ;
151152 return ( ( ctor ( rnd ) * mag ) >> ctor ( len * 8 ) ) + ctor ( min ) ;
152153}
153- exports . randomInteger = randomInteger ;
154154;
155155/**
156156 * Base Class of `js-combinatorics`
0 commit comments