Skip to main content

MclmcStats

Struct MclmcStats 

Source
pub struct MclmcStats<P: HasDims, H: Storable<P>, A: Storable<P>, Pt: Storable<P>> {
    pub chain: u64,
    pub draw: u64,
    pub num_steps: u64,
    pub energy_change: f64,
    pub log_weight: f64,
    pub tuning: bool,
    pub hamiltonian: H,
    pub adapt: A,
    pub point: Pt,
    pub average_step_size: f64,
    pub divergence: DivergenceStats,
    /* private fields */
}
Expand description

Per-draw sampler statistics for MclmcChain.

Fields§

§chain: u64§draw: u64§num_steps: u64§energy_change: f64§log_weight: f64

Unnormalized log importance weight for this draw: log_weight = log(step_size_factor) − energy_change.

step_size_factor is the factor applied to the base step size for the final leapfrog step (1.0 when no dynamic retry occurred). log(factor) corrects for varying sampling density under dynamic step size reduction; it is 0.0 (no correction) when the step is taken at full size. The −energy_change term corrects for integration error. See Robnik & Seljak (2023), arXiv:2212.08549.

§tuning: bool§hamiltonian: H§adapt: A§point: Pt§average_step_size: f64§divergence: DivergenceStats

Trait Implementations§

Source§

impl<P: Debug + HasDims, H: Debug + Storable<P>, A: Debug + Storable<P>, Pt: Debug + Storable<P>> Debug for MclmcStats<P, H, A, Pt>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<P: HasDims, H: Storable<P>, A: Storable<P>, Pt: Storable<P>> Storable<P> for MclmcStats<P, H, A, Pt>

Source§

fn names(parent: &P) -> Vec<&str>

Source§

fn item_type(parent: &P, item: &str) -> ItemType

Source§

fn dims<'a>(parent: &'a P, item: &str) -> Vec<&'a str>

Source§

fn event_dim(parent: &P, item: &str) -> Option<&'static str>

Return the name of the primary dimension for the given field, or None if the field uses the default draw dimension.
Source§

fn get_all<'a>(&'a mut self, parent: &'a P) -> Vec<(&'a str, Option<Value>)>

Auto Trait Implementations§

§

impl<P, H, A, Pt> Freeze for MclmcStats<P, H, A, Pt>
where H: Freeze, A: Freeze, Pt: Freeze,

§

impl<P, H, A, Pt> RefUnwindSafe for MclmcStats<P, H, A, Pt>

§

impl<P, H, A, Pt> Send for MclmcStats<P, H, A, Pt>

§

impl<P, H, A, Pt> Sync for MclmcStats<P, H, A, Pt>

§

impl<P, H, A, Pt> Unpin for MclmcStats<P, H, A, Pt>
where H: Unpin, A: Unpin, Pt: Unpin,

§

impl<P, H, A, Pt> UnsafeUnpin for MclmcStats<P, H, A, Pt>

§

impl<P, H, A, Pt> UnwindSafe for MclmcStats<P, H, A, Pt>
where H: UnwindSafe, A: UnwindSafe, Pt: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,