pub struct IrDlrTransform { /* private fields */ }Expand description
Linear map between the coefficients of an IR basis and of a DLR on the same domain.
The DLR basis function of pole ω_i is expanded in the IR basis as
u_i = Σ_l T[l, i] U_l with T[l, i] = -s_l V_l(ω_i) (w_i / w^{IR}_i),
where w_i and w^{IR}_i are the pole weights of the DLR and of the IR
kernel. DLR -> IR applies T; IR -> DLR is its least-squares inverse.
Implementations§
Source§impl IrDlrTransform
impl IrDlrTransform
Sourcepub fn matrix(&self) -> &Matrix<f64>
pub fn matrix(&self) -> &Matrix<f64>
The ir_size x dlr_size matrix T mapping DLR to IR coefficients.
Sourcepub fn ir_to_dlr_nd<T: FitScalar>(
&self,
backend: Option<&GemmBackendHandle>,
gl: &TypedTensor<T>,
dim: usize,
) -> Result<TypedTensor<T>, Error>
pub fn ir_to_dlr_nd<T: FitScalar>( &self, backend: Option<&GemmBackendHandle>, gl: &TypedTensor<T>, dim: usize, ) -> Result<TypedTensor<T>, Error>
IR -> DLR along axis dim (least squares).
The mathematical transform does not depend on the axis placement or the memory order of the arrays, but the floating-point result can: a different axis placement selects a different contraction geometry, and the GEMM backend decides how that geometry is blocked. Bitwise agreement across axis placements is not guaranteed, and conditioning or cancellation can amplify the difference (SpM-lab/sparse-ir-rs#326).
§Errors
The errors of DiscreteLehmannRepresentation::from_ir_nd.
Sourcepub fn dlr_to_ir_nd<T: FitScalar>(
&self,
backend: Option<&GemmBackendHandle>,
g_dlr: &TypedTensor<T>,
dim: usize,
) -> Result<TypedTensor<T>, Error>
pub fn dlr_to_ir_nd<T: FitScalar>( &self, backend: Option<&GemmBackendHandle>, g_dlr: &TypedTensor<T>, dim: usize, ) -> Result<TypedTensor<T>, Error>
DLR -> IR along axis dim.
The mathematical transform does not depend on the axis placement or the memory order of the arrays, but the floating-point result can: a different axis placement selects a different contraction geometry, and the GEMM backend decides how that geometry is blocked. Bitwise agreement across axis placements is not guaranteed, and conditioning or cancellation can amplify the difference (SpM-lab/sparse-ir-rs#326).
§Errors
The errors of DiscreteLehmannRepresentation::to_ir_nd.
Auto Trait Implementations§
impl !Freeze for IrDlrTransform
impl !RefUnwindSafe for IrDlrTransform
impl !UnwindSafe for IrDlrTransform
impl Send for IrDlrTransform
impl Sync for IrDlrTransform
impl Unpin for IrDlrTransform
impl UnsafeUnpin for IrDlrTransform
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
§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 more