pub trait DualNumber: Clone + Copy {
// Required methods
fn value(self) -> f64;
fn derivative(self) -> f64;
fn new(value: f64, derivative: f64) -> Self;
fn constant(value: f64) -> Self;
fn variable(value: f64) -> Self;
}Expand description
Trait for dual number operations
Required Methods§
Sourcefn derivative(self) -> f64
fn derivative(self) -> f64
Get the derivative part
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.