combinatorics

Members

(static, constant) bin2gray

Description:
  • Transforms an array of binary bits into Gray Code.
Source:
See:
Transforms an array of binary bits into Gray Code.

(static, constant) combinations

Description:
  • Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.
Source:
See:
Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.

(static, constant) combinationsIterator

Description:
  • Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).
Source:
See:
Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).

(static, constant) gray2bin

Description:
  • Decodes a Gray code array back into standard binary formatting.
Source:
See:
Decodes a Gray code array back into standard binary formatting.

(static, constant) nChooseK

Description:
  • Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.
Source:
See:
Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.

(static, constant) permutations

Description:
  • Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).
Source:
See:
Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).

(static, constant) permutationsIterator

Description:
  • Creates a permutations generator from a specified size or an array of elements.
Source:
See:
Creates a permutations generator from a specified size or an array of elements.

Methods

(inner) convertBit()

Description:
  • Internal logic for toggling bit state based on MSB progression.
Source:

Members

(static, constant) bin2gray

Description:
  • Transforms an array of binary bits into Gray Code.
Source:
See:
Transforms an array of binary bits into Gray Code.

(static, constant) combinations

Description:
  • Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.
Source:
See:
Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.

(static, constant) combinationsIterator

Description:
  • Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).
Source:
See:
Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).

(static, constant) gray2bin

Description:
  • Decodes a Gray code array back into standard binary formatting.
Source:
See:
Decodes a Gray code array back into standard binary formatting.

(static, constant) nChooseK

Description:
  • Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.
Source:
See:
Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.

(static, constant) permutations

Description:
  • Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).
Source:
See:
Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).

(static, constant) permutationsIterator

Description:
  • Creates a permutations generator from a specified size or an array of elements.
Source:
See:
Creates a permutations generator from a specified size or an array of elements.

Methods

(inner) convertBit()

Description:
  • Internal logic for toggling bit state based on MSB progression.
Source:

Members

(static, constant) bin2gray

Description:
  • Transforms an array of binary bits into Gray Code.
Source:
See:
Transforms an array of binary bits into Gray Code.

(static, constant) combinations

Description:
  • Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.
Source:
See:
Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.

(static, constant) combinationsIterator

Description:
  • Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).
Source:
See:
Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).

(static, constant) gray2bin

Description:
  • Decodes a Gray code array back into standard binary formatting.
Source:
See:
Decodes a Gray code array back into standard binary formatting.

(static, constant) nChooseK

Description:
  • Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.
Source:
See:
Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.

(static, constant) permutations

Description:
  • Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).
Source:
See:
Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).

(static, constant) permutationsIterator

Description:
  • Creates a permutations generator from a specified size or an array of elements.
Source:
See:
Creates a permutations generator from a specified size or an array of elements.

Methods

(inner) convertBit()

Description:
  • Internal logic for toggling bit state based on MSB progression.
Source:

Members

(static, constant) bin2gray

Description:
  • Transforms an array of binary bits into Gray Code.
Source:
See:
Transforms an array of binary bits into Gray Code.

(static, constant) combinations

Description:
  • Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.
Source:
See:
Returns all combinations synchronously. WARNING: Calling this with mathematically large sets will overflow local RAM.

(static, constant) combinationsIterator

Description:
  • Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).
Source:
See:
Generates all possible combinations of size n from a set of size k without repetition. Yields arrays of indices representing the current combination. Optimized with lexicographic progression to skip invalid states, running in O(1) amortized time per sequence instead of O(k^n).

(static, constant) gray2bin

Description:
  • Decodes a Gray code array back into standard binary formatting.
Source:
See:
Decodes a Gray code array back into standard binary formatting.

(static, constant) nChooseK

Description:
  • Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.
Source:
See:
Newton's formula (Binomial Coefficient) n choose k. Evaluates the number of possible combinations. Built strictly on BigInt and optimized iterative fraction reduction to prevent RAM and precision loss during massive factorial expansions.

(static, constant) permutations

Description:
  • Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).
Source:
See:
Returns all permutations synchronously. WARNING: Generates size! (factorial) elements. Scales in O(N!).

(static, constant) permutationsIterator

Description:
  • Creates a permutations generator from a specified size or an array of elements.
Source:
See:
Creates a permutations generator from a specified size or an array of elements.

Methods

(inner) convertBit()

Description:
  • Internal logic for toggling bit state based on MSB progression.
Source: