Permutation Module
The Permutation module defines a type and helper functions
for representing and constructing permutations from integer arrays.
Functions and values
| Function or value | Description |
Full Usage:
Permutation.identity k
Parameters:
int
Returns: int
|
|
|
|
Full Usage:
Permutation.ofArray arr
Parameters:
int[]
-
An array of length n that should represent
a valid permutation of 0..n-1.
Returns: Permutation
A Permutation function representing the same reordering as
arr.
|
|
Full Usage:
Permutation.ofFreshArray arr
Parameters:
int[]
-
The array containing the permutation. Each element arr[i] must
be a unique integer in [0..n-1].
Returns: Permutation
A permutation function Permutation where P(i) = arr[i].
|
|
Full Usage:
Permutation.ofPairs mappings
Parameters:
(int * int) seq
Returns: int -> int
|
|
Full Usage:
Permutation.reversal size
Parameters:
int
Returns: int -> int
|
|
Full Usage:
Permutation.rotation size distance
Parameters:
int
distance : int
Returns: int -> int
|
|
|
|
Full Usage:
Permutation.swap n m k
Parameters:
int
m : int
k : int
Returns: int
|
|
FSharp.Stats