- java.lang.Object
-
- org.ojalgo.function.special.CombinatorialFunctions
-
public abstract class CombinatorialFunctions extends java.lang.Objecthttps://reference.wolfram.com/language/tutorial/CombinatorialFunctions.html
-
-
Constructor Summary
Constructors Constructor Description CombinatorialFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longpartitions(int n, int[] k)static longpermutations(int n)static longsubsets(int n, int k)static longvariations(int n, int k)
-
-
-
Method Detail
-
partitions
public static long partitions(int n, int[] k)- Parameters:
n- The number of elements in the setk- A vector of subset sizes the sum of which must equal the size of the full set- Returns:
- The number of ways the set can be partitioned in to subsets of the given sizes
-
permutations
public static long permutations(int n)
- Parameters:
n- The number of elements in the set- Returns:
- The number of permutations of the set
-
subsets
public static long subsets(int n, int k)- Parameters:
n- The number of elements in the setk- The number of elements in the subset- Returns:
- The number of subsets to the set
-
variations
public static long variations(int n, int k)- Parameters:
n- The number of elements in the setk- The size of the tuple- Returns:
- The number of ordered k-tuples (variations) of the set
-
-