public class Arrangement extends Object implements Serializable
Constructor and Description |
---|
Arrangement(String[] datas)
构造
|
Modifier and Type | Method and Description |
---|---|
static long |
count(int n)
计算排列数,即A(n, n) = n!
|
static long |
count(int n,
int m)
计算排列数,即A(n, m) = n!
|
static long |
countAll(int n)
计算排列总数,即A(n, 1) + A(n, 2) + A(n, 3)...
|
List<String[]> |
select()
全排列选择(列表全部参与排列)
|
List<String[]> |
select(int m)
排列选择(从列表中选择m个排列)
|
List<String[]> |
selectAll()
排列所有组合,即A(n, 1) + A(n, 2) + A(n, 3)...
|
public Arrangement(String[] datas)
datas
- 用于排列的数据public static long count(int n)
n
- 总数public static long count(int n, int m)
n
- 总数m
- 选择的个数public static long countAll(int n)
n
- 总数Copyright © 2024. All rights reserved.