pub struct Interpolate2D<T> {
pub x_min: T,
pub x_max: T,
pub y_min: T,
pub y_max: T,
pub coeffs: DTensor<T, 2>,
pub gauss_x: Rule<T>,
pub gauss_y: Rule<T>,
}Expand description
2D interpolation object for a single grid cell
This structure stores pre-computed polynomial coefficients for efficient interpolation within a single grid cell.
Fields§
§x_min: TCell boundaries
x_max: T§y_min: T§y_max: T§coeffs: DTensor<T, 2>Pre-computed polynomial coefficients
gauss_x: Rule<T>Grid points (for validation)
gauss_y: Rule<T>Implementations§
Source§impl<T: CustomNumeric + Debug + 'static> Interpolate2D<T>
impl<T: CustomNumeric + Debug + 'static> Interpolate2D<T>
Sourcepub fn interpolate(&self, x: T, y: T) -> T
pub fn interpolate(&self, x: T, y: T) -> T
Sourcepub fn coefficients(&self) -> &DTensor<T, 2>
pub fn coefficients(&self) -> &DTensor<T, 2>
Get the coefficient matrix
Sourcepub fn bounds(&self) -> (T, T, T, T)
pub fn bounds(&self) -> (T, T, T, T)
Get cell boundaries
Sourcepub fn domain(&self) -> (T, T, T, T)
pub fn domain(&self) -> (T, T, T, T)
Get domain boundaries (alias for bounds)
Sourcepub fn n_points_x(&self) -> usize
pub fn n_points_x(&self) -> usize
Get the number of interpolation points in x direction
Sourcepub fn n_points_y(&self) -> usize
pub fn n_points_y(&self) -> usize
Get the number of interpolation points in y direction
Trait Implementations§
Source§impl<T: Clone> Clone for Interpolate2D<T>
impl<T: Clone> Clone for Interpolate2D<T>
Source§fn clone(&self) -> Interpolate2D<T>
fn clone(&self) -> Interpolate2D<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for Interpolate2D<T>where
T: Freeze,
impl<T> RefUnwindSafe for Interpolate2D<T>where
T: RefUnwindSafe,
impl<T> Send for Interpolate2D<T>where
T: Send,
impl<T> Sync for Interpolate2D<T>where
T: Sync,
impl<T> Unpin for Interpolate2D<T>where
T: Unpin,
impl<T> UnwindSafe for Interpolate2D<T>where
T: UnwindSafe + RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoCloned<T> for T
impl<T> IntoCloned<T> for 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>
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 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.