Package org.aoju.bus.core.math
Class Combine
java.lang.Object
org.aoju.bus.core.math.Combine
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Combine
-
-
Method Details
-
count
public static long count(int n, int m) 计算组合数,即C(n, m) = n!/((n-m)! * m!)- Parameters:
n- 总数m- 选择的个数- Returns:
- 组合数
-
countAll
public static long countAll(int n) 计算组合总数,即C(n, 1) + C(n, 2) + C(n, 3)...- Parameters:
n- 总数- Returns:
- 组合数
-
select
-
selectAll
-