Class CombinatorialFunctions

java.lang.Object
org.ojalgo.function.special.CombinatorialFunctions

public abstract class CombinatorialFunctions extends Object
https://reference.wolfram.com/language/tutorial/CombinatorialFunctions.html
  • Constructor Details

    • CombinatorialFunctions

      public CombinatorialFunctions()
  • Method Details

    • partitions

      public static long 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 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 set
      k - 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 set
      k - The size of the tuple
      Returns:
      The number of ordered k-tuples (variations) of the set