Dual

Type Alias Dual 

Source
pub type Dual<T> = Hyperdual<T, 2>;

Aliased Type§

pub struct Dual<T>(/* private fields */);

Implementations§

Source§

impl<T: Copy + Scalar> Dual<T>

Source

pub fn new(real: T, dual: T) -> Dual<T>

Source

pub fn dual(&self) -> T

Source

pub fn dual_ref(&self) -> &T

Returns a reference to the dual part

Source

pub fn dual_mut(&mut self) -> &mut T

Returns a mutable reference to the dual part