pub struct DerivativeBatch { /* private fields */ }Expand description
The result of derivative_batch — one DerivativeSolution per point,
in point order.
Implementations§
Source§impl DerivativeBatch
impl DerivativeBatch
Sourcepub fn solutions(&self) -> &[DerivativeSolution]
pub fn solutions(&self) -> &[DerivativeSolution]
Every lane’s solution, in the order the points were supplied.
Sourcepub fn into_solutions(self) -> Vec<DerivativeSolution>
pub fn into_solutions(self) -> Vec<DerivativeSolution>
Consume the batch, yielding the per-lane solutions.
Sourcepub fn get(&self, i: usize) -> Option<DerivativeSolution>
pub fn get(&self, i: usize) -> Option<DerivativeSolution>
Lane i’s solution, or None if i is out of range.
Sourcepub fn failure_count(&self) -> usize
pub fn failure_count(&self) -> usize
How many lanes failed.
Sourcepub fn first_failure(&self) -> Option<(usize, DerivativeSolution)>
pub fn first_failure(&self) -> Option<(usize, DerivativeSolution)>
The first failing lane and its solution, if any.
Sourcepub fn failures(&self) -> Vec<(usize, DerivativeSolution)>
pub fn failures(&self) -> Vec<(usize, DerivativeSolution)>
Every failing lane and its solution.
Sourcepub fn values(&self) -> Result<Vec<f64>, DiffBatchFailure>
pub fn values(&self) -> Result<Vec<f64>, DiffBatchFailure>
Every lane’s derivative, all or nothing.
§Errors
DiffBatchFailure naming the failure count and the first failing lane
if any lane failed. A partially-NaN Vec<f64> is never returned.
Sourcepub fn check_all_ok(&self) -> Result<(), DiffBatchFailure>
pub fn check_all_ok(&self) -> Result<(), DiffBatchFailure>
Trait Implementations§
Source§impl Clone for DerivativeBatch
impl Clone for DerivativeBatch
Source§impl Debug for DerivativeBatch
impl Debug for DerivativeBatch
Source§impl PartialEq for DerivativeBatch
impl PartialEq for DerivativeBatch
impl StructuralPartialEq for DerivativeBatch
Auto Trait Implementations§
impl Freeze for DerivativeBatch
impl RefUnwindSafe for DerivativeBatch
impl Send for DerivativeBatch
impl Sync for DerivativeBatch
impl Unpin for DerivativeBatch
impl UnsafeUnpin for DerivativeBatch
impl UnwindSafe for DerivativeBatch
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