pub trait DualStruct {
type Real;
type Inner: DualStruct;
// Required methods
fn re(&self) -> Self::Real;
fn from_inner(inner: &Self::Inner) -> Self;
}Expand description
A struct that contains dual numbers. Needed for arbitrary arguments in ImplicitFunction.
The trait is implemented for all dual types themselves, and common data types (tuple, vec, array, …) and can be implemented for custom data types to achieve full flexibility.
Required Associated Types§
type Real
type Inner: DualStruct
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl DualStruct for ()
impl DualStruct for ()
Source§impl DualStruct for f32
impl DualStruct for f32
Source§impl DualStruct for f64
impl DualStruct for f64
Source§impl<D: DualNum, R: Dim, C: Dim> DualStruct for OMatrix<D, R, C>where
DefaultAllocator: Allocator<R, C>,
Available on crate feature nalgebra only.
impl<D: DualNum, R: Dim, C: Dim> DualStruct for OMatrix<D, R, C>where
DefaultAllocator: Allocator<R, C>,
Available on crate feature
nalgebra only.