Namespaces

Types

Type Combinatorics

Namespace MathNet.Numerics

Methods

Properties

Public instance methods

bool Equals(object obj)

Parameters
return bool
object obj

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

string ToString()

Parameters
return string

Public static methods

double Combinations(int n, int k)

Computes the number of combinations without repetition. When the order does not matter and each object can be chosen only once.
Parameters
return double
int n
int k

double CombinationsWithRepetition(int n, int k)

Computes the number of combinations with repetition. When the order does not matter and an object can be chosen more than once.
Parameters
return double
int n
int k

double Permutations(int n)

Computes the number of permutations (without repetition).
Parameters
return double
int n Number of (distinguishable) elements in the set.

Boolean[] RandomCombination(int n, int k)

Randomly selects k of n elements without order and repetition.
Parameters
return Boolean[]
int n
int k

Boolean[] RandomCombination(int n)

Randomly selects some of N elements without order and repetition.
Parameters
return Boolean[]
int n

Int32[] RandomCombinationWithRepetition(int n, int k)

Randomly selects k of n elements with repetition but without order.
Parameters
return Int32[]
int n
int k

Int32[] RandomPermutation(int n)

Randomly shuffles the numbers 0 to N-1.
Parameters
return Int32[]
int n

void RandomShuffle<T>(IList<T> source, IList<T> target)

Parameters
IList<T> source
IList<T> target

void RandomShuffle<T>(IList<T> array)

Parameters
IList<T> array

T[] RandomSubsetCombination<T>(IList<T> array, int numberToSelect)

Parameters
return T[]
IList<T> array
int numberToSelect

T[] RandomSubsetCombinationWithRepetition<T>(IList<T> array, int numberToSelect)

Parameters
return T[]
IList<T> array
int numberToSelect

T[] RandomSubsetVariation<T>(IList<T> array, int numberToSelect)

Parameters
return T[]
IList<T> array
int numberToSelect

T[] RandomSubsetVariationWithRepetition<T>(IList<T> array, int numberToSelect)

Parameters
return T[]
IList<T> array
int numberToSelect

Int32[] RandomVariation(int n, int k)

Randomly selects k of n elements with order but without repetition.
Parameters
return Int32[]
int n
int k

Int32[] RandomVariationWithRepetition(int n, int k)

Randomly selects k of n elements with order and repetition.
Parameters
return Int32[]
int n
int k

double Variations(int n, int k)

Computes the number of variations without repetition. When the order matters and each object can be chosen only once.
Parameters
return double
int n
int k

double VariationsWithRepetition(int n, int k)

Computes the number of variations with repetition. When the order matters and an object can be chosen more than once.
Parameters
return double
int n
int k

Public properties

RandomSource RandomSource get; set;

Random source supporting the randomized operations.
The default value is a SystemRandomSource.
return RandomSource