Class AggDesUtil

java.lang.Object
java.util.BitSet
org.pentaho.aggdes.util.AggDesUtil
All Implemented Interfaces:
Serializable, Cloneable

public class AggDesUtil extends BitSet
Miscellaneous utility functions for the Aggregate Designer.
See Also:
  • Method Details

    • countCombinations

      public static BigInteger countCombinations(int n, int k)
      Computes the Binomial coefficient.

      Informally, if there are n pizza toppings then the binomial coefficient C(n, k) gives the number of ways to create a pizza that has k toppings.

      Parameters:
      n - N
      k - R
      Returns:
      binomial coefficient C(n, k)
    • cast

      public static <T> List<T> cast(List<?> list)
      Casts a List to a List with a different element type.
      Type Parameters:
      T - Element type
      Parameters:
      list - List
      Returns:
      List of desired type