@shumoku/core · 0.6.1 · function
deriveMapping
APIの説明は英語のcanonical sourceを表示しています。
Derive a legacy `MetricsMapping` from the bindings in an observation record, keyed by the drawn graph's element ids (the record is keyed by the same ids). - Node host binding → `mapping.nodes[node.id]`. - Link interface binding lives on a port's record; we attribute it to the link whose endpoint references that port, keyed `link.id || link-${i}` to match the rest of the server (server.ts / topologies.ts). Pure; never mutates the input.
deriveMapping(graph: Pick<NetworkGraph, "nodes" | "links">, observation: ObservationLayer | undefined, activeSourceIds?: ReadonlySet<string>): MetricsMapping パラメーター
| 名前 | 型 | 説明 | 既定値 |
|---|---|---|---|
graph | Pick<NetworkGraph, "nodes" | "links"> | 追加説明はありません。 | — |
observation | ObservationLayer | undefined | 追加説明はありません。 | — |
activeSourceIds | ReadonlySet<string> | 追加説明はありません。 | — |
戻り値
MetricsMapping libs/@shumoku/core/src/libs/@shumoku/core/src/observation/metrics-binding.ts:57