pub struct LogNormal {
pub mu: Ex,
pub sigma: Ex,
}Expand description
LogNormal(μ, σ): ln X ~ Normal(μ, σ); density
e^{−(ln x − μ)²/(2σ²)} / (xσ√(2π)) on (0, ∞).
Fields§
§mu: ExMean μ of ln X.
sigma: ExStandard deviation σ > 0 of ln X.
Trait Implementations§
Source§impl Family for LogNormal
impl Family for LogNormal
Source§fn parameters(&self) -> Vec<(&'static str, Ex)>
fn parameters(&self) -> Vec<(&'static str, Ex)>
The parameters, named, in the family’s documented order.
Source§fn eq_family(&self, other: &dyn Family) -> bool
fn eq_family(&self, other: &dyn Family) -> bool
Structural equality with another family (see
same_family).Source§fn density(&self, x: &Ex) -> Ex
fn density(&self, x: &Ex) -> Ex
The density (continuous) or probability mass function (discrete) as
an expression in
x, valid on the support.Source§fn quantile(&self, p: &Ex) -> Option<Ex>
fn quantile(&self, p: &Ex) -> Option<Ex>
Closed-form quantile function (inverse CDF) at
p ∈ (0, 1).Source§fn entropy(&self) -> Option<Ex>
fn entropy(&self) -> Option<Ex>
Closed-form entropy (differential for a continuous family, Shannon
for a discrete one), in nats.
Source§fn probability_of(&self, _region: &Support) -> Option<Result<Ex, SymplexError>>
fn probability_of(&self, _region: &Support) -> Option<Result<Ex, SymplexError>>
P(X ∈ region) when the family can answer more directly than by
integrating its density over support ∩ region (a mixture sums its
components). None leaves it to the generic route.Source§fn expectation_over(
&self,
_g: &Ex,
_x: &Ex,
_region: &Support,
) -> Option<Result<Ex, SymplexError>>
fn expectation_over( &self, _g: &Ex, _x: &Ex, _region: &Support, ) -> Option<Result<Ex, SymplexError>>
E[g(X)·1_{X ∈ region}] for g in the symbol x, when the family
can answer directly. None leaves it to the generic route.Source§fn sampler(&self) -> Option<Result<Sampler, SymplexError>>
fn sampler(&self) -> Option<Result<Sampler, SymplexError>>
A sampler, when the family has a route of its own (a wrapper
transforms its inner family’s samples).
None leaves it to the
generic route: inverse transform through the quantile, or cumulative
sums of the mass function.Source§fn fmt_display(&self, f: &mut Formatter<'_>) -> Result
fn fmt_display(&self, f: &mut Formatter<'_>) -> Result
Name(p₁, p₂, …).impl StructuralPartialEq for LogNormal
Auto Trait Implementations§
impl !RefUnwindSafe for LogNormal
impl !UnwindSafe for LogNormal
impl Freeze for LogNormal
impl Send for LogNormal
impl Sync for LogNormal
impl Unpin for LogNormal
impl UnsafeUnpin for LogNormal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more