排列與匹配
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. |
返回
| 打亂後 | 整數陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 排列與匹配
- 所屬包
- 罪案引擎