KernelProperties

Trait KernelProperties 

Source
pub trait KernelProperties {
    type SVEHintsType<T>: SVEHints<T> + Clone
       where T: Copy + Debug + Send + Sync + CustomNumeric + 'static;

    // Required methods
    fn ypower(&self) -> i32;
    fn conv_radius(&self) -> f64;
    fn xmax(&self) -> f64;
    fn ymax(&self) -> f64;
    fn weight<S: StatisticsType + 'static>(&self, beta: f64, omega: f64) -> f64;
    fn inv_weight<S: StatisticsType + 'static>(
        &self,
        beta: f64,
        omega: f64,
    ) -> f64;
    fn sve_hints<T>(&self, epsilon: f64) -> Self::SVEHintsType<T>
       where T: Copy + Debug + Send + Sync + CustomNumeric + 'static;
}
Expand description

Trait for kernel type properties (static characteristics)

Required Associated Types§

Source

type SVEHintsType<T>: SVEHints<T> + Clone where T: Copy + Debug + Send + Sync + CustomNumeric + 'static

Associated type for SVE hints

Required Methods§

Source

fn ypower(&self) -> i32

Power with which the y coordinate scales.

For most kernels, this is 0 (no scaling). For RegularizedBoseKernel, this is 1 (linear scaling).

Source

fn conv_radius(&self) -> f64

Convergence radius of the Matsubara basis asymptotic model

For improved numerical accuracy, IR basis functions on Matsubara axis can be evaluated from asymptotic expression for |n| > conv_radius.

Source

fn xmax(&self) -> f64

Get the upper bound of the x domain

Source

fn ymax(&self) -> f64

Get the upper bound of the y domain

Source

fn weight<S: StatisticsType + 'static>(&self, beta: f64, omega: f64) -> f64

Weight function for given statistics.

The kernel is applied to a scaled spectral function ρ’(y) as: ∫ K(x, y) ρ’(y) dy, where ρ’(y) = w(y) ρ(y).

This function returns w(beta, omega) that transforms the original spectral function ρ(y) into the scaled version ρ’(y) used in the integral equation.

@param beta Inverse temperature @param omega Frequency @return The weight value w(beta, omega)

Source

fn inv_weight<S: StatisticsType + 'static>(&self, beta: f64, omega: f64) -> f64

Inverse weight function to avoid division by zero.

This is a safer API that returns the inverse weight.

@param beta Inverse temperature @param omega Frequency @return The inverse weight value

Source

fn sve_hints<T>(&self, epsilon: f64) -> Self::SVEHintsType<T>
where T: Copy + Debug + Send + Sync + CustomNumeric + 'static,

Create SVE hints for this kernel type.

Provides discretization hints for singular value expansion computation. The hints include segment information and numerical parameters optimized for the specific kernel type.

@param epsilon Target accuracy for the SVE computation @return SVE hints specific to this kernel type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§