org.ojalgo.random

## Class RandomUtils

• Deprecated.
v48

```@Deprecated
public abstract class RandomUtils
extends Object```
RandomUtils
Author:
apete
• ### Method Detail

• #### calculateVariance

```@Deprecated
public static double calculateVariance(double sumOfValues,
double sumOfSquaredValues,
int numberOfValues)```
Parameters:
`sumOfValues` - The sum of all values in a sample set
`sumOfSquaredValues` - The sum of all squared values, in a sample set
`numberOfValues` - The number of values in the sample set
Returns:
The sample set's variance
• #### gamma

```@Deprecated
public static double gamma(double arg)```
Deprecated. v48 Use `GammaFunction.gamma(double)` instead
Lanczos approximation. The abritray constant is 7, and there are 9 coefficients used. Essentially the algorithm is taken from WikipediA , but it's modified a bit and I found more exact coefficients somewhere else.
• #### partitions

```@Deprecated
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

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

```@Deprecated
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

```@Deprecated
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