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 regularizer<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 regularizer<S: StatisticsType + 'static>(&self, beta: f64, omega: f64) -> f64

A regularizer for a bosonic kernel for avoiding a divergence at omega = 0.

The bosonic kernel diverges at omega = 0. This function returns a regularizer w(beta, omega) that avoids this divergence.

G(τ) = - ∫ K(τ, ω) ρ(ω) dω = - ∫ [K(τ, ω) w(ω)] [ρ(ω)/w(ω)] dω.

The spectral function ρ(ω) and the weight function w(ω) must vanish linearly at omega = 0. For a fermionic kernel, this function is expected to return 1.0.

§Arguments
  • beta - Inverse temperature
  • omega - Frequency
§Returns

The regularizer value w(beta, omega)

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§