pub struct DiscretizedKernel<T> {
pub matrix: DTensor<T, 2>,
pub gauss_x: Rule<T>,
pub gauss_y: Rule<T>,
pub segments_x: Vec<T>,
pub segments_y: Vec<T>,
}Expand description
This structure stores a discrete kernel matrix along with the corresponding Gauss quadrature rules for x and y coordinates. This enables easy application of weights for SVE computation and maintains the relationship between matrix elements and their corresponding quadrature points.
Fields§
§matrix: DTensor<T, 2>Discrete kernel matrix
gauss_x: Rule<T>Gauss quadrature rule for x coordinates
gauss_y: Rule<T>Gauss quadrature rule for y coordinates
segments_x: Vec<T>X-axis segment boundaries (from SVEHints)
segments_y: Vec<T>Y-axis segment boundaries (from SVEHints)
Implementations§
Source§impl<T: CustomNumeric + Clone> DiscretizedKernel<T>
impl<T: CustomNumeric + Clone> DiscretizedKernel<T>
Sourcepub fn new(
matrix: DTensor<T, 2>,
gauss_x: Rule<T>,
gauss_y: Rule<T>,
segments_x: Vec<T>,
segments_y: Vec<T>,
) -> Self
pub fn new( matrix: DTensor<T, 2>, gauss_x: Rule<T>, gauss_y: Rule<T>, segments_x: Vec<T>, segments_y: Vec<T>, ) -> Self
Create a new DiscretizedKernel
Sourcepub fn new_legacy(
matrix: DTensor<T, 2>,
gauss_x: Rule<T>,
gauss_y: Rule<T>,
) -> Self
pub fn new_legacy( matrix: DTensor<T, 2>, gauss_x: Rule<T>, gauss_y: Rule<T>, ) -> Self
Create a new DiscretizedKernel without segments (legacy)
pub fn nrows(&self) -> usize
pub fn ncols(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = &T>
Sourcepub fn apply_weights_for_sve(&self) -> DTensor<T, 2>
pub fn apply_weights_for_sve(&self) -> DTensor<T, 2>
Apply weights for SVE computation
This applies the square root of Gauss weights to the matrix, which is required before performing SVD for SVE computation. The original matrix remains unchanged.
Sourcepub fn remove_weights_from_sve(&mut self)
pub fn remove_weights_from_sve(&mut self)
Remove weights from matrix (inverse of apply_weights_for_sve)
Trait Implementations§
Source§impl<T: Clone> Clone for DiscretizedKernel<T>
impl<T: Clone> Clone for DiscretizedKernel<T>
Source§fn clone(&self) -> DiscretizedKernel<T>
fn clone(&self) -> DiscretizedKernel<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> Freeze for DiscretizedKernel<T>where
T: Freeze,
impl<T> RefUnwindSafe for DiscretizedKernel<T>where
T: RefUnwindSafe,
impl<T> Send for DiscretizedKernel<T>where
T: Send,
impl<T> Sync for DiscretizedKernel<T>where
T: Sync,
impl<T> Unpin for DiscretizedKernel<T>where
T: Unpin,
impl<T> UnwindSafe for DiscretizedKernel<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
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>
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.