Expand description
The complex math trait family.
Thermite’s math families (CoreMath,
TranscendentalMath,
SpatialMath,
RealMath) are all Self -> Self, a real vector
having nothing else to return. A complex number does: its modulus and argument
are real, and its polar form is a pair of reals. Those operations get their own
family here, built the way the core ones are:
ComplexVectorcarries the structure: the associated real typeReal, the component accessors, and the operations that take noPolicy(conj,norm_sqr,inv,norm_l1).SpecializedComplexMathcarries the algorithms, mirroringthermite::math::specialized.ComplexMathWithPolicyandComplexMathare generated from it bydecl_complex_math!(a copy of core’sdecl_math!), giving each operation afoo_p::<P>()and a default-policyfoo()form.
So z.norm_p::<Precision>() behaves as x.sin_p::<Precision>() does, and
generic code bounds on V: ComplexMath as it would on V: TranscendentalMath.
Re-exports§
pub use crate::math::special::SpecializedComplexSpecialMath;special
Traits§
- Complex
Vector - A vector of complex numbers over a real vector type.
- Specialized
Complex Math - Element-parameterized implementations behind
ComplexMath.