complex op• Datenarten: cpoints × cpoints → cscalar
• Aufruf: import mathops; mathops.cplx_contour_integral(z, fz) (oder opsmath.get("cplx_contour_integral"))
Geschlossenes Konturintegral `∮ f(z) dz` mit der Sehnen-Trapezregel.
> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.
*z* are the contour vertices (closing segment implicit, see
:func:cplx_contour_circle) and *fz* the function sampled at exactly those
points — the op never calls back into Python, so any `f` is allowed as
long as you can sample it. The quadrature is
`sum_k (f_k + f_{k+1})/2 * (z_{k+1} - z_k)`, i.e. the trapezoidal rule
along the *chords*; it is exact for a piecewise-linear integrand and second
order otherwise.
Ground truth it reproduces: `f = 1/(z - a)` around a circle enclosing
`a integrates to 2*pi*i` (Cauchy); measured on the unit circle with
`a = 0, the relative error is 1.0e-4 at n = 256` and
6.3e-6 at `n = 1024` — a factor 16.0 for 4x
refinement, i.e. the `O(n^-2)` rate, *not* the spectral accuracy the
trapezoid rule enjoys when applied in the angle parameter. That difference
is the honest price of accepting an arbitrary point list instead of a
parametrisation.
Orientation follows the sample order: a clockwise contour returns the
negative of the counter-clockwise one.
Raises `ValueError: fewer than 3 points, len(z) != len(fz)`, a
degenerate contour (all points coincide), non-finite/masked input, or a sum
that overflowed (`|f|` near a pole *on* the path).
HALCON: no operator (contour integration is not part of its tuple/XLD API).
Jeder mathops-Operator prüft seine Eingabe vor der Berechnung (nichts rutscht stillschweigend durch):
• **Komplexe Eingaben lösen ValueError aus** — die Umwandlung nach float64 verwirft den Imaginärteil stillschweigend (numpy meldet nur eine ComplexWarning und liefert eine plausibel aussehende, falsche reelle Zahl). Schreiben Sie .real/.imag/abs() explizit oder nutzen Sie complexops.
• **Masked Arrays mit maskierten Elementen lösen ValueError aus** — die implizite Umwandlung, die die Maske abstreift und die Rohwerte darunter verwendet, wird abgelehnt. Geben Sie explizit an, ob gefüllt oder verworfen wird.
• **NaN/Inf löst bei jeder Eingabe ValueError aus** (mit Anzahl abgelehnt — es pflanzt sich durch das gesamte Ergebnis fort).
• Formen sind strikt: 1-D und 2-D werden nie implizit hochgestuft oder gebroadcastet (eine Matrix im Vektor-Slot oder ein Vektor im Matrix-Slot löst ValueError aus; reshapen Sie explizit).
• Größenobergrenze: Operatoren, die eine Matrix nehmen, sowie die stat_histogram-Bins lösen jenseits von mathops.MAX_ELEMENTS (2^26 ≈ 67 Mio. Elemente) ValueError aus.
• Leitfaden zur Familie math_metrology
• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).
• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.
• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.
• math_complex — py -3.11 examples/math_complex.py
• representation_conversion — py -3.11 examples/representation_conversion.py
cscalar als Eingabe)—
complex)cplx_contour_circle · cplx_poly_eval · cplx_winding_number · cplx_cauchy_value · cplx_argument_principle · cplx_laurent_coeffs · cplx_joukowski · cplx_mobius
*Provenance: mathops.py — MATH Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.