pub trait DlrFromIr<S>: Sizedwhere
S: StatisticsType,{
// Required methods
fn from_ir_with_poles<B>(basis: &B, poles: Vec<f64>) -> Result<Self, Error>
where B: IrBasis<S>;
fn from_ir<B>(basis: &B) -> Result<Self, Error>
where B: IrBasis<S>;
}Expand description
Constructors of a DiscreteLehmannRepresentation from an IR basis
The returned DLR carries the IrDlrTransform of its source basis, so
DiscreteLehmannRepresentation::from_ir_nd and
DiscreteLehmannRepresentation::to_ir_nd work on it.
Required Methods§
Sourcefn from_ir_with_poles<B>(basis: &B, poles: Vec<f64>) -> Result<Self, Error>where
B: IrBasis<S>,
fn from_ir_with_poles<B>(basis: &B, poles: Vec<f64>) -> Result<Self, Error>where
B: IrBasis<S>,
Create a DLR from an IR basis with custom poles
The tau-domain pole basis is built from the logistic representation, while kernel-specific regularizers are preserved for compatible kernels.
§Arguments
basis- The IR basis to construct DLR frompoles- Pole positions on the real-frequency axis, in [-ωmax, ωmax] ofbasis
§Errors
Error::KernelStatisticsMismatchif the kernel does not support the requested statistics (e.g.RegularizedBoseKernelwith fermionic statistics)Error::EmptyInputifpolesis emptyError::NonFiniteInputif a pole is NaN or infinite, andError::OutOfDomainif a pole is outside [-ωmax, ωmax] ofbasis, both namedpoles, for the first such poleError::NotSupportedfor a bosonic pole at 0 if the kernel has aypowerother than 0 or 1 (the DLR knows the limit at 0 for those only)
Duplicate poles are accepted. They make DiscreteLehmannRepresentation::from_ir_nd
ill-conditioned: the coefficients of equal poles are not unique,
although the round trip through DiscreteLehmannRepresentation::to_ir_nd still recovers the
IR coefficients.
Sourcefn from_ir<B>(basis: &B) -> Result<Self, Error>where
B: IrBasis<S>,
fn from_ir<B>(basis: &B) -> Result<Self, Error>where
B: IrBasis<S>,
Create a DLR from an IR basis with its default pole locations
Uses the default omega sampling points from the basis.
§Arguments
basis- The IR basis to construct DLR from
§Errors
Error::InsufficientDefaultPolesif the basis has fewer default poles than functions. This can happen with certain kernel types (e.g.RegularizedBoseKernel) due to numerical precision limitations in root finding.Error::KernelStatisticsMismatchas inSelf::from_ir_with_polesError::NotSupportedas inSelf::from_ir_with_poles: for a default pole at 0 of a bosonic basis whose kernel has aypowerother than 0 or 1- The errors of
Basis::default_omega_sampling_points(NotSupported for an SVE with too few singular functions)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".