Skip to main content

Recipe

Trait Recipe 

Source
pub trait Recipe<T: Numeric>: CubeType<ExpandType: RecipeExpand<T>> {
    // Required method
    fn evaluate(&self, coordinates: &RecipeCoords) -> T;

    // Provided method
    fn __expand_evaluate(
        scope: &Scope,
        this: &<Self as CubeType>::ExpandType,
        coordinates: &<RecipeCoords as CubeType>::ExpandType,
    ) -> <T as CubeType>::ExpandType { ... }
}
Expand description

An N-dimensional scalar field evaluated at absolute logical coordinates.

Required Methods§

Source

fn evaluate(&self, coordinates: &RecipeCoords) -> T

Provided Methods§

Source

fn __expand_evaluate( scope: &Scope, this: &<Self as CubeType>::ExpandType, coordinates: &<RecipeCoords as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Float> Recipe<T> for Phase<T>

Source§

impl<T: Numeric, A: Recipe<T>, B: Recipe<T>> Recipe<T> for Product<A, B>

Source§

impl<T: Numeric, A: Recipe<T>, B: Recipe<T>> Recipe<T> for Sum<A, B>

Source§

impl<T: Numeric, R: Recipe<T>> Recipe<T> for Factors<R>

Source§

impl<T: Numeric> Recipe<T> for AffineCoordinate<T>

Source§

impl<T: Numeric> Recipe<T> for Constant<T>

Source§

impl<T: Numeric> Recipe<T> for MemoryValues