org.ojalgo.function.special

## Class CombinatorialFunctions

• ```public abstract class CombinatorialFunctions
extends Object```
https://reference.wolfram.com/language/tutorial/CombinatorialFunctions.html
Author:
apete
• ### Method Summary

All Methods
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)```
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Method Detail

• #### factorial

`public static double factorial(int arg)`
• #### partitions

```public static int partitions(int n,
int[] k)```
Parameters:
`n` - The number of elements in the set
`k` - 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 partioned in to subsets of the given sizes
• #### permutations

`public static int permutations(int n)`
Parameters:
`n` - The number of elements in the set
Returns:
The number of permutations of the set
• #### subsets

```public static int subsets(int n,
int k)```
Parameters:
`n` - The number of elements in the set
`k` - The number of elements in the subset
Returns:
The number of subsets to the set
• #### variations

```public static int variations(int n,
int k)```
Parameters:
`n` - The number of elements in the set
`k` - The size of the tuple
Returns:
The number of ordered k-tuples (variations) of the set