wasserstein_1d — COLORTRANSPORT transport op

Data kinds: signal × signalscalar

Call: import colortransport; colortransport.wasserstein_1d(u_values, v_values, p=1, u_weights=None, v_weights=None) (or opscolortransport.get("wasserstein_1d"))

Usage

The 1-D p-Wasserstein distance. Exact.

> The detailed description below is the original text — the summary and the headings are translated.

1 次元では最適輸送に閉じた形があり、累積分布の逆関数どうしの

`L^p` 距離になる ―― 反復も近似も要らない。総当たりの割当問題

(`scipy.optimize.linear_sum_assignment`)と厳密に一致することを

テストで固定してある。

Parameters

----------

u_values, v_values : array_like

標本(1 次元に潰される)。長さは違ってよい。

p : float

次数。`p=1 が Earth Mover 距離、p=2` が 2-Wasserstein。

u_weights, v_weights : array_like, optional

標本ごとの重み(和は内部で 1 に正規化する)。

Returns

-------

float

Background guides (the physics and conventions behind this op)

colorimetry — 測色と分光の知識 — 色は「分光 × 光源 × 観測者」でしか決まらない

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

color_transportpy -3.11 examples/color_transport.py

Ops the type connects to (they accept scalar as input)

Same category (transport)

transport_plan_1d · sinkhorn · sinkhorn_distance · sinkhorn_divergence


*Provenance: colortransport.py — COLORTRANSPORT operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.