pub(crate) struct ScaledGammaLadder {
degree: f64,
argument: Complex,
modulus: f64,
exponential: Complex,
reflected: bool,
upper: Option<Complex>,
pending: Vec<Complex>,
}Expand description
Scaled incomplete gamma functions R(d) = Gamma(d, a) / a^d of one argument at
descending degrees d = n, n-1, ...: downward by R(d) = (a R(d+1) - e^-a) / d,
which is stable once |d| >= |a|, and above that upward from one upper_gamma
evaluation up to LADDER_RUN degrees lower. At a = 0 every value is the limit
-1/d. reflected selects the branch -sqrt(a) for half-integer degrees.
Fields§
§degree: f64§argument: Complex§modulus: f64|a|, which every step compares with the degree.
exponential: Complex§reflected: bool§upper: Option<Complex>R one degree higher, once one value exists.
pending: Vec<Complex>Values of the next degrees from the upward recurrence; the last one is next.
Implementations§
Source§impl ScaledGammaLadder
impl ScaledGammaLadder
Sourcepub(crate) fn new(n: f64, argument: Complex, reflected: bool) -> Self
pub(crate) fn new(n: f64, argument: Complex, reflected: bool) -> Self
A ladder whose first value is R(n).
Sourcepub(crate) fn next_lower(&mut self) -> Complex
pub(crate) fn next_lower(&mut self) -> Complex
The next value: R(n) first, then one degree lower each call.
Sourcefn seed(&self, degree: f64) -> Complex
fn seed(&self, degree: f64) -> Complex
R on the selected branch from one gamma evaluation, or its limit at a = 0.
Where Gamma(d, a) or a^d leave the normal range of f64 (near |d| = |a| from
|a| of about 120, at far evanescent orders of the lattice sums) R = e^-a h
comes from the continued fraction h itself; the division scales the denominator
first.
Trait Implementations§
Source§impl Clone for ScaledGammaLadder
impl Clone for ScaledGammaLadder
Source§fn clone(&self) -> ScaledGammaLadder
fn clone(&self) -> ScaledGammaLadder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScaledGammaLadder
impl RefUnwindSafe for ScaledGammaLadder
impl Send for ScaledGammaLadder
impl Sync for ScaledGammaLadder
impl Unpin for ScaledGammaLadder
impl UnwindSafe for ScaledGammaLadder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<T> Pointable for T
impl<T> Pointable for T
§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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.