complex op• データ種: なし → cpoints(引数だけで決まる op —— 画像やデータの入力を取らない)
• 呼び出し: import mathops; mathops.cplx_contour_circle(center=0.0, radius=1.0, n=256, orientation='ccw') (または opsmath.get("cplx_contour_circle"))
円を閉曲線として標本化する —— 標準的な積分路。
> 以下の詳細説明は原文のままです —— 要約と見出しは訳出済み。
Returns `n complex points center + radius * exp(±i * 2*pi*k/n)`,
`k = 0..n-1. The closing segment z[-1] -> z[0]` is implicit: the
first point is *not* repeated (every contour op in this family closes the
polygon itself; repeating it would only add a zero-length segment).
*orientation* is explicit because in complex analysis the sign of every
result depends on it: `'ccw'` (default) is the positive/mathematical
direction — the one for which the residue theorem, the Cauchy formula and
the argument principle carry a `+ sign — and 'cw'` negates all three.
Honest limitation: this is a polygon through samples of the circle, not
the circle. Its enclosed area is short by a factor `sinc`-like in
`2*pi/n, and every quadrature on it converges as O(n^-2)`
(:func:cplx_contour_integral documents the measured rate).
Raises `ValueError: non-finite *center*/*radius*, radius <= 0`,
`n not an integer in [3, MAX_CONTOUR_POINTS]` (a fail-closed size cap
— `n=10**9` would allocate 16 GB), unknown *orientation*.
HALCON: no complex-plane operator (`gen_circle_contour_xld` draws the
same geometry as an XLD contour for image space).
mathops の全 op は入力を検証してから計算する(黙って通さない):
• **complex 入力は ValueError** — float64 への強制変換は虚部を黙って捨てる(numpy は ComplexWarning だけ出して「もっともらしく間違った」実数を返す)。.real/.imag/abs() を明示するか、複素対応の complexops を使う。
• **masked array(masked 要素あり)は ValueError** — マスクを剥がして下の生値を使う暗黙変換を拒否。埋める/落とすを明示する。
• **NaN/Inf は全入力で ValueError**(件数を明示して拒否 — 結果全体に伝播するため)。
• 形状は厳格: 1-D と 2-D を暗黙昇格・ブロードキャストしない(vector 枠に matrix、matrix 枠に vector は ValueError。reshape を明示する)。
• サイズ上限: 行列を取る op と stat_histogram の bins は mathops.MAX_ELEMENTS(2^26 ≈ 6700 万要素)超で ValueError。
• サンプルデータ カタログ(DL URL / ライセンス) — 2-D は skimage.data(BSD/public)+ 合成、3-D は実データ源(Stanford/PDS 等)の DL URL。
• 演算子の来歴・参考文献 — この op 族の元になった研究/手法の出典。
• アルゴリズムの正典(著者・年)と用途は上記ファミリ使い方ガイドに記載。
• math_complex — py -3.11 examples/math_complex.py
cpoints を入力に取れる)cplx_poly_eval · cplx_contour_integral · cplx_winding_number · cplx_cauchy_value · cplx_argument_principle · cplx_laurent_coeffs · cplx_joukowski · cplx_mobius
complex)cplx_poly_eval · cplx_contour_integral · cplx_winding_number · cplx_cauchy_value · cplx_argument_principle · cplx_laurent_coeffs · cplx_joukowski · cplx_mobius
*Provenance: mathops.py — MATH operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.