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> DiscretizedKernel<T>where
T: CustomNumeric + Clone,
impl<T> DiscretizedKernel<T>where
T: CustomNumeric + Clone,
Sourcepub fn new(
matrix: Mat<T>,
gauss_x: Rule<T>,
gauss_y: Rule<T>,
segments_x: Vec<T>,
segments_y: Vec<T>,
) -> DiscretizedKernel<T>
pub fn new( matrix: Mat<T>, gauss_x: Rule<T>, gauss_y: Rule<T>, segments_x: Vec<T>, segments_y: Vec<T>, ) -> DiscretizedKernel<T>
Create a new DiscretizedKernel
Sourcepub fn new_legacy(
matrix: Mat<T>,
gauss_x: Rule<T>,
gauss_y: Rule<T>,
) -> DiscretizedKernel<T>
pub fn new_legacy( matrix: Mat<T>, gauss_x: Rule<T>, gauss_y: Rule<T>, ) -> DiscretizedKernel<T>
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) -> 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.
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 for DiscretizedKernel<T>where
T: Clone,
impl<T> Clone for DiscretizedKernel<T>where
T: Clone,
Source§fn clone(&self) -> DiscretizedKernel<T>
fn clone(&self) -> DiscretizedKernel<T>
1.0.0 (const: unstable) · 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> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
impl<T, U> Imply<T> for U
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 moreimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSendSync for T
impl<T> MaybeSync for Twhere
T: Sync,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.