References
summary | ||
private |
Applies a given sequence (in the given order) of transpositions (given as index tuples) to a given permutation. |
|
private |
F _bitreversal(array: Array, n: number) Fills an input array with the bitreversal permutation for input
|
|
private |
Compose two input permutations. |
|
private |
Copy an input permutation to an output array. |
|
private |
Computes a cycle decomposition of an input permutation. |
|
private |
Fills an input array with the identity permutation on input |
|
private |
Fills an input array with the inverse |
|
private |
F _invertcycles(cycles: Iterable, tau: Array) Inverts given cycles in a given permutation in-place. |
|
private |
F * _itranspositions(sigma: Array, used: Array): IterableIterator Computes the sequence of transpositions that if applied to
|
|
private |
Updates the input permutation to the next one in-place. |
|
private |
F * _permutations(sigma: Array, n: number): IterableIterator Yields all permutations starting from a given one and ending at the last permutation. |
|
private |
Reverses input permutation in-place from input index |
|
private |
F _transpose(a: number, b: number, sigma: Array) Transpose elements of input index |
|
private |
F _transposition(a: number, b: number, sigma: Array) Helper method for transposition. |
|
private |
F * _transpositions(cycles: Iterable): IterableIterator Computes the transposition decomposition of some permutation given its cycle decomposition. |
|
private |
For a given size |
|
public |
Apply a given sequence (in the given order) of transpositions (given as
index tuples) to the identity permutation over input |
|
public |
F bitreversal(n: number): Array Returns a newly allocated array containing the bitreversal permutation for
input |
|
public |
Compose two input permutations. |
|
public |
Make a copy of the input permutation. |
|
public |
Computes a cycle decomposition of the input permutation. |
|
public |
Returns the identity permutation of a given size. |
|
public |
Computes the inverse |
|
public |
F itranspositions(sigma: Array): IterableIterator Computes the sequence of transpositions that if applied to
|
|
public |
Computes the permutation that follows the input permutation. |
|
public |
F permutation(n: number): Array Allocates a new permutation of given input size. |
|
public |
F * permutations(n: number): IterableIterator Generate all permutations on |
|
public |
Reverses input permutation in-place. |
|
public |
Outputs a new permutation that is the reverse of the input permutation. |
|
public |
Creates a copy of the input permutation, applies an input transpose, then returns the result. |
|
public |
F transposition(n: number, a: number, b: number): undefined Outputs the permutation on input |
|
public |
F transpositions(sigma: Array): IterableIterator Computes the transposition decomposition of the input permutation as an Iterator. |
|
public |
Generates an helper array of given size (used in _cycle, cycle). |