structure op• データ種: graph → conn_graph
• 呼び出し: import fullseye as fs; fs.ledger.knn_graph_to_conn_graph(graph, weight='inverse_distance', symmetric=True) (実装を直接呼ぶなら import reprconv; reprconv.knn_graph_to_conn_graph(graph, weight='inverse_distance', symmetric=True)、台帳から引くなら opsreprconv.get("knn_graph_to_conn_graph"))
• GPU: なし(CPU 参照実装のみ)
k 近傍グラフ graph → 重みつき隣接行列 conn_graph (n, n)。graph 型の出口。
knn_graph の返り (idx (n,k) int, dist (n,k) float) を、conn_graph 族(graph_components / graph_laplacian_spectrum / graph_layout_spectral …)が受ける n×n の W[i, j] = i → j の重みにする。weight:
• "inverse_distance" —— 1 / dist(近いほど強い。距離 0 の重複点は拒否する)
• "distance" —— dist そのもの(経路長として使う側向け)
• "binary" —— 1
symmetric=True で W = max(W, Wᵀ)(k 近傍は片想いがあるので、無向グラフとして扱うなら対称化する)。対角は 0(knn_graph は自分を除いている)。n は conngraph.MAX_NODES(4096)まで —— 密行列なので、それを超える点群は先に farthest_point_sampling などで間引く。
Args:
graph: (idx, dist) の 2-tuple(knn_graph の返り)。
weight: "inverse_distance" / "distance" / "binary"。
symmetric: True で対称化。
Returns:
(n, n) float64。
Raises:
ValueError: 2-tuple でない / 形が違う / 添字が範囲外 / 自己ループ / n が上限超え /
inverse_distance で距離 0 / weight が不正。
• サンプルデータ カタログ(DL URL / ライセンス) — 2-D は skimage.data(BSD/public)+ 合成、3-D は実データ源(Stanford/PDS 等)の DL URL。
• 演算子の来歴・参考文献 — この op 族の元になった研究/手法の出典。
• アルゴリズムの正典(著者・年)と用途は上記ファミリ使い方ガイドに記載。
• type_connectivity_tour — py -3.11 examples/type_connectivity_tour.py
conn_graph を入力に取れる)—
structure)frame_axis · pointmap_to_points · match_component
*Provenance: reprconv.py — REPRCONV operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.