排列与匹配
4 个节点
本页内容 4
最大匹配
函数As many pairs as can be made between a left set and a right set, each pair along an allowed edge and nothing used twice: workers to jobs, players to seats. The nth edge joins left[n] to right[n].
签名
最大匹配 -> (对数: 整数, 配对: 整数数组)
左侧数量: 整数
右侧数量: 整数
边的左端: 整数数组
边的右端: 整数数组int MaximumMatching(
int leftCount,
int rightCount,
int[] edgeLefts,
int[] edgeRights,
out int[] partners)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 左侧数量 | 整数 | — | How many on the left, numbered from 0. |
| 右侧数量 | 整数 | — | How many on the right, numbered from 0. |
| 边的左端 | 整数数组 | — | Each allowed edge's left end. |
| 边的右端 | 整数数组 | — | Each allowed edge's right end. |
返回
| 对数 | 整数 |
| 配对 | 整数数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 排列与匹配
- 所属包
- 罪案引擎
随机排列
函数The numbers 0 to count - 1 in a random order.
签名
随机排列(数量: 整数, 种子: 整数) -> 整数数组
int[] Permutation(int count, int seed = 1)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 数量 | 整数 | — | How many. |
| 种子 | 整数 | 1 | The same seed gives the same order. |
返回
| 顺序 | 整数数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 排列与匹配
- 所属包
- 罪案引擎
随机抽样
函数Some of the numbers 0 to from - 1, none twice, in a random order.
签名
随机抽样(抽取数量: 整数, 总数: 整数, 种子: 整数) -> 整数数组
int[] Sample(int count, int from, int seed = 1)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 抽取数量 | 整数 | — | How many to take. |
| 总数 | 整数 | — | How many there are to take from. |
| 种子 | 整数 | 1 | The same seed gives the same sample. |
返回
| 样本 | 整数数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 排列与匹配
- 所属包
- 罪案引擎
打乱数字
函数The numbers in a random order.
签名
打乱数字(数字: 整数数组, 种子: 整数) -> 整数数组
int[] Shuffle(int[] values, int seed = 1)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 数字 | 整数数组 | — | The numbers. |
| 种子 | 整数 | 1 | The same seed gives the same order. |
返回
| 打乱后 | 整数数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 排列与匹配
- 所属包
- 罪案引擎