public class Combination extends Object implements Serializable
Constructor and Description |
---|
Combination(String[] datas)
组合,即C(n, m)
排列组合相关类 参考:http://cgs1999.iteye.com/blog/2327664 |
Modifier and Type | Method and Description |
---|---|
static long |
count(int n,
int m)
计算组合数,即C(n, m) = n!
|
static long |
countAll(int n)
计算组合总数,即C(n, 1) + C(n, 2) + C(n, 3)...
|
List<String[]> |
select(int m)
组合选择(从列表中选择m个组合)
|
List<String[]> |
selectAll()
全组合
|
public Combination(String[] datas)
datas
- 用于组合的数据Copyright © 2024. All rights reserved.