pub struct PiecewiseLegendreFT<S>where
S: StatisticsType,{ /* private fields */ }Expand description
Piecewise Legendre polynomial with Fourier transform capability
This represents a piecewise Legendre polynomial that can be evaluated in the Matsubara frequency domain using Fourier transform.
Implementations§
Source§impl<S> PiecewiseLegendreFT<S>where
S: StatisticsType,
impl<S> PiecewiseLegendreFT<S>where
S: StatisticsType,
Sourcepub fn new(
poly: PiecewiseLegendrePoly,
_stat: S,
n_asymp: Option<f64>,
) -> Result<PiecewiseLegendreFT<S>, Error>
pub fn new( poly: PiecewiseLegendrePoly, _stat: S, n_asymp: Option<f64>, ) -> Result<PiecewiseLegendreFT<S>, Error>
Create a new PiecewiseLegendreFT from a polynomial and statistics
§Arguments
poly- The underlying piecewise Legendre polynomialstat- Statistics type (Fermionic or Bosonic)n_asymp- Asymptotic cutoff frequency index (default: infinity)
§Errors
Error::InvalidParameterif the domain ofpolyis not [-1, 1] within 1e-12, orn_asympis NaN or negative (infinity, the default, disables the asymptotic model)
Sourcepub fn get_n_asymp(&self) -> f64
pub fn get_n_asymp(&self) -> f64
Get the asymptotic cutoff frequency index
Sourcepub fn get_statistics(&self) -> Statistics
pub fn get_statistics(&self) -> Statistics
Get the statistics type
Sourcepub fn get_poly(&self) -> &PiecewiseLegendrePoly
pub fn get_poly(&self) -> &PiecewiseLegendrePoly
Get a reference to the underlying polynomial
Sourcepub fn evaluate(&self, omega: &MatsubaraFreq<S>) -> Complex<f64>
pub fn evaluate(&self, omega: &MatsubaraFreq<S>) -> Complex<f64>
Sourcepub fn evaluate_at_n(&self, n: i64) -> Result<Complex<f64>, Error>
pub fn evaluate_at_n(&self, n: i64) -> Result<Complex<f64>, Error>
Evaluate at integer Matsubara index
§Errors
Error::InvalidMatsubaraIndex if n has the wrong parity for the
statistics (it returned 0 before)
Sourcepub fn evaluate_at_ns(&self, ns: &[i64]) -> Result<Vec<Complex<f64>>, Error>
pub fn evaluate_at_ns(&self, ns: &[i64]) -> Result<Vec<Complex<f64>>, Error>
Evaluate at multiple Matsubara indices
§Errors
The error of Self::evaluate_at_n for the first invalid index
Trait Implementations§
Source§impl<S> Clone for PiecewiseLegendreFT<S>where
S: Clone + StatisticsType,
impl<S> Clone for PiecewiseLegendreFT<S>where
S: Clone + StatisticsType,
Source§fn clone(&self) -> PiecewiseLegendreFT<S>
fn clone(&self) -> PiecewiseLegendreFT<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S> Freeze for PiecewiseLegendreFT<S>
impl<S> RefUnwindSafe for PiecewiseLegendreFT<S>where
S: RefUnwindSafe,
impl<S> Send for PiecewiseLegendreFT<S>where
S: Send,
impl<S> Sync for PiecewiseLegendreFT<S>where
S: Sync,
impl<S> Unpin for PiecewiseLegendreFT<S>where
S: Unpin,
impl<S> UnsafeUnpin for PiecewiseLegendreFT<S>
impl<S> UnwindSafe for PiecewiseLegendreFT<S>where
S: 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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.