Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StirlingMatrix [2000][2000]*big.Int
_____________________________PRE CALCULS____________________________________
Functions ¶
func S3v4pre ¶ added in v1.1.0
Implementation of the s3 formula (read the readme section Related proposition 9 for more details) n - number of elements in the set k - number of blocks desired d - last element of the unranked prefix
func UnrankDichoPre ¶
Unrank set partition lexicographicaly.
This function is the main function of the package and takes 4 arguments as parameters : - n : int, the cardinal of the set to be partitioned. n must be < 2000 - k : int, the number of desired blocks in the result. k must be < 2000 - rank : big.Int, the rank of the desired set partition in the lexicographical order. - whichS3: [|0,2|], the desired version of S3 formula to use (2 is the fastest, 0 is the slowest). For the time complexity, read the README section Related, theorem 12 of the article Example usage:
result := parallelunranking.UnrankDicho(5, 3, *big.NewInt(10), 4) fmt.Println(result) // Output: [[1 2 3] [4] [5]]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.