Package org.pentaho.aggdes.util
Class AggDesUtil
java.lang.Object
java.util.BitSet
org.pentaho.aggdes.util.AggDesUtil
- All Implemented Interfaces:
Serializable
,Cloneable
Miscellaneous utility functions for the Aggregate Designer.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List
<T> Casts a List to a List with a different element type.static BigInteger
countCombinations
(int n, int k) Computes the Binomial coefficient.Methods inherited from class java.util.BitSet
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, set, set, set, set, size, stream, toByteArray, toLongArray, toString, valueOf, valueOf, valueOf, valueOf, xor
-
Method Details
-
countCombinations
Computes the Binomial coefficient.Informally, if there are
n
pizza toppings then the binomial coefficientC(n, k)
gives the number of ways to create a pizza that hask
toppings.- Parameters:
n
- Nk
- R- Returns:
- binomial coefficient C(n, k)
-
cast
Casts a List to a List with a different element type.- Type Parameters:
T
- Element type- Parameters:
list
- List- Returns:
- List of desired type
-