pub struct DiscretizedKernel<T> {
pub matrix: Mat<T>,
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: Mat<T>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: Mat<T>,
gauss_x: Rule<T>,
gauss_y: Rule<T>,
segments_x: Vec<T>,
segments_y: Vec<T>,
) -> Self
pub fn new( matrix: Mat<T>, gauss_x: Rule<T>, gauss_y: Rule<T>, segments_x: Vec<T>, segments_y: Vec<T>, ) -> Self
Create a new DiscretizedKernel
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) -> Mat<T>
pub fn apply_weights_for_sve(&self) -> Mat<T>
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.
Trait Implementations§
Source§impl<T: Clone> Clone for DiscretizedKernel<T>
impl<T: Clone> Clone for DiscretizedKernel<T>
Auto 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> UnsafeUnpin for DiscretizedKernel<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DiscretizedKernel<T>where
T: UnwindSafe,
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.