public abstract class CombinatorialFunctions extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
factorial(int arg) |
static int |
partitions(int n,
int[] k) |
static int |
permutations(int n) |
static int |
subsets(int n,
int k) |
static int |
variations(int n,
int k) |
public static double factorial(int arg)
public static int partitions(int n,
int[] k)
n - The number of elements in the setk - A vector of subset sizes the sum of which must equal the size of the full setpublic static int permutations(int n)
n - The number of elements in the setpublic static int subsets(int n,
int k)
n - The number of elements in the setk - The number of elements in the subsetpublic static int variations(int n,
int k)
n - The number of elements in the setk - The size of the tupleCopyright © 2019 Optimatika. All rights reserved.