|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Public Member Functions | |
| __init__ (self, float re=0.0, float im=0.0) | |
| "Scalar" | from_complex (cls, complex z) |
| float | real (self) |
| float | imag (self) |
| float | to_double (self) |
| float | __float__ (self) |
| complex | __complex__ (self) |
| "Scalar" | __add__ (self, "Scalar" other) |
| "Scalar" | __sub__ (self, "Scalar" other) |
| "Scalar" | __mul__ (self, "Scalar" other) |
| "Scalar" | __truediv__ (self, "Scalar" other) |
| "Scalar" | __neg__ (self) |
| bool | __eq__ (self, object other) |
| "Scalar" | from_cpp (cls, cpp_obj) |
| str | __repr__ (self) |
Protected Attributes | |
| _cpp_obj | |
Python wrapper for the C++ scalar_t class. scalar_t is an enhanced complex number type that supports real projection, full arithmetic, and compatibility with Python's numeric types.
| Scalar.Scalar.__init__ | ( | self, | |
| float | re = 0.0, |
||
| float | im = 0.0 |
||
| ) |
| complex Scalar.Scalar.__complex__ | ( | self | ) |
| float Scalar.Scalar.__float__ | ( | self | ) |
| "Scalar" Scalar.Scalar.__truediv__ | ( | self, | |
| "Scalar" | other | ||
| ) |
| "Scalar" Scalar.Scalar.from_complex | ( | cls, | |
| complex | z | ||
| ) |
| "Scalar" Scalar.Scalar.from_cpp | ( | cls, | |
| cpp_obj | |||
| ) |
| float Scalar.Scalar.imag | ( | self | ) |
| float Scalar.Scalar.real | ( | self | ) |
Returns the real part.
``Scalar.from_cpp`` can receive either a bound ``scalar_t`` object or a
native Python ``complex`` depending on the pybind overload that produced
the value. The C++ object exposes ``real()`` as a method, while Python
complex exposes ``real`` as a float attribute; both forms are supported.
Returns:
float: Real component.
| float Scalar.Scalar.to_double | ( | self | ) |