pub struct ShapeBulkEval<E: BulkEvaluator> { /* private fields */ }Expand description
Wrapper around a BulkEvaluator
Unlike the raw bulk evaluator, a ShapeBulkEval knows about the
tape’s X, Y, Z axes and optional transform matrix.
Implementations§
Source§impl<E: BulkEvaluator> ShapeBulkEval<E>
impl<E: BulkEvaluator> ShapeBulkEval<E>
Sourcepub fn eval(
&mut self,
tape: &ShapeTape<E::Tape>,
x: &[E::Data],
y: &[E::Data],
z: &[E::Data],
) -> Result<&[E::Data], Error>
pub fn eval( &mut self, tape: &ShapeTape<E::Tape>, x: &[E::Data], y: &[E::Data], z: &[E::Data], ) -> Result<&[E::Data], Error>
Sourcepub fn eval_vs<V: Deref<Target = [G]>, G: Into<E::Data> + Copy>(
&mut self,
tape: &ShapeTape<E::Tape>,
x: &[E::Data],
y: &[E::Data],
z: &[E::Data],
vars: &ShapeVars<V>,
) -> Result<&[E::Data], Error>
pub fn eval_vs<V: Deref<Target = [G]>, G: Into<E::Data> + Copy>( &mut self, tape: &ShapeTape<E::Tape>, x: &[E::Data], y: &[E::Data], z: &[E::Data], vars: &ShapeVars<V>, ) -> Result<&[E::Data], Error>
Bulk evaluation of many samples, with slices of variables
Each variable is a slice (or Vec) of values, which must be the same
length as the x, y, z slices. This is in contrast with
eval_vs, where variables have a single value used for
every position in the x, y, z slices.
Before evaluation, the tape’s transform matrix is applied (if present).
Sourcepub fn eval_v<G: Into<E::Data> + Copy>(
&mut self,
tape: &ShapeTape<E::Tape>,
x: &[E::Data],
y: &[E::Data],
z: &[E::Data],
vars: &ShapeVars<G>,
) -> Result<&[E::Data], Error>
pub fn eval_v<G: Into<E::Data> + Copy>( &mut self, tape: &ShapeTape<E::Tape>, x: &[E::Data], y: &[E::Data], z: &[E::Data], vars: &ShapeVars<G>, ) -> Result<&[E::Data], Error>
Bulk evaluation of many samples, with fixed variables
Each variable has a single value, which is used for every position in
the x, y, z slices. This is in contrast with
eval_vs, where variables can be different for every
position in the x, y, z slices.
Before evaluation, the tape’s transform matrix is applied (if present).
Trait Implementations§
Source§impl<E: Debug + BulkEvaluator> Debug for ShapeBulkEval<E>
impl<E: Debug + BulkEvaluator> Debug for ShapeBulkEval<E>
Source§impl<E: Default + BulkEvaluator> Default for ShapeBulkEval<E>
impl<E: Default + BulkEvaluator> Default for ShapeBulkEval<E>
Source§fn default() -> ShapeBulkEval<E>
fn default() -> ShapeBulkEval<E>
Auto Trait Implementations§
impl<E> Freeze for ShapeBulkEval<E>where
E: Freeze,
impl<E> RefUnwindSafe for ShapeBulkEval<E>
impl<E> Send for ShapeBulkEval<E>
impl<E> Sync for ShapeBulkEval<E>
impl<E> Unpin for ShapeBulkEval<E>
impl<E> UnsafeUnpin for ShapeBulkEval<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for ShapeBulkEval<E>
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.