pub struct VectorizedForwardAD<F: IntegrateFloat> { /* private fields */ }Expand description
Vectorized forward mode AD for computing multiple directional derivatives
Implementations§
Source§impl<F: IntegrateFloat> VectorizedForwardAD<F>
impl<F: IntegrateFloat> VectorizedForwardAD<F>
Sourcepub fn new(n_vars: usize, n_directions: usize) -> Self
pub fn new(n_vars: usize, n_directions: usize) -> Self
Create a new vectorized forward AD engine
Sourcepub fn directional_derivatives<Func>(
&self,
f: Func,
x: ArrayView1<'_, F>,
directions: &[ArrayView1<'_, F>],
) -> IntegrateResult<Array1<F>>
pub fn directional_derivatives<Func>( &self, f: Func, x: ArrayView1<'_, F>, directions: &[ArrayView1<'_, F>], ) -> IntegrateResult<Array1<F>>
Compute multiple directional derivatives simultaneously
Sourcepub fn jacobian_vectorized<Func>(
&self,
f: Func,
x: ArrayView1<'_, F>,
chunk_size: usize,
) -> IntegrateResult<Array2<F>>
pub fn jacobian_vectorized<Func>( &self, f: Func, x: ArrayView1<'_, F>, chunk_size: usize, ) -> IntegrateResult<Array2<F>>
Compute Jacobian using vectorized forward mode
Auto Trait Implementations§
impl<F> Freeze for VectorizedForwardAD<F>where
F: Freeze,
impl<F> RefUnwindSafe for VectorizedForwardAD<F>where
F: RefUnwindSafe,
impl<F> Send for VectorizedForwardAD<F>where
F: Send,
impl<F> Sync for VectorizedForwardAD<F>where
F: Sync,
impl<F> Unpin for VectorizedForwardAD<F>where
F: Unpin,
impl<F> UnwindSafe for VectorizedForwardAD<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more