Skip to content

Commit

Permalink
strip unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dankogai committed Jul 27, 2020
1 parent 702af5e commit f826850
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions combinatorics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,13 @@ class _CBase {
* Permutation
*/
export class Permutation extends _CBase {
/**
*
* @param {Iterable} seed
* @param {Number} size
*/
constructor(seed, size = 0) {
super();
this.seed = [...seed];
this.size = 0 < size && size <= this.seed.length ? size : this.seed.length;
this.length = permutation(seed.length, this.size);
Object.freeze(this);
}
/**
* @param {anyint} n
*/
nth(n: anyint, nocheck = false) {
if (!nocheck)
n = this._check(n);
Expand All @@ -186,11 +178,6 @@ export class Permutation extends _CBase {
* Combination
*/
export class Combination extends _CBase {
/**
*
* @param {Iterable} seed
* @param {Number} size
*/
perm: Permutation;
constructor(seed: Iterable<any>, size = 0) {
super();
Expand All @@ -200,9 +187,6 @@ export class Combination extends _CBase {
this.length = combination(sseed.length, this.size);
Object.freeze(this);
}
/**
* @param {anyint} n
*/
nth(n: anyint) {
n = this._check(n);
function findIndex(n) {
Expand Down Expand Up @@ -235,9 +219,6 @@ export class BaseN extends _CBase {
this.length = _crop(length);
Object.freeze(this);
}
/**
* @param {anyint} bn
*/
nth(n: anyint) {
let bn = _BI(this._check(n));
const bb = _BI(this.base);
Expand All @@ -255,19 +236,13 @@ export class BaseN extends _CBase {
* Power Set
*/
export class PowerSet extends _CBase {
/**
* @param {Iterable} seed
*/
constructor(seed: Iterable<any>) {
super();
this.seed = [...seed];
const length = _BI(1) << _BI(this.seed.length);
this.length = _crop(length);
Object.freeze(this);
}
/**
* @param {anyint} n
*/
nth(n: anyint) {
let bn = _BI(this._check(n));
let result = [];
Expand All @@ -281,9 +256,6 @@ export class PowerSet extends _CBase {
* Cartesian Product
*/
export class CartesianProduct extends _CBase {
/**
* @param {Iterable[]} args
*/
constructor(...args: Iterable<any>[]) {
super();
this.seed = args.map(v => [...v]);
Expand All @@ -292,9 +264,6 @@ export class CartesianProduct extends _CBase {
this.length = _crop(length);
Object.freeze(this);
}
/**
*
 */
nth(n: anyint) {
let bn = _BI(this._check(n));
let result = [];
Expand Down

0 comments on commit f826850

Please sign in to comment.