pub struct ReflectionWalkProposal {
pub lower_bound: f64,
pub upper_bound: f64,
}Expand description
Reflection-based proposal for bounded continuous distributions (symmetric).
Reflects a Gaussian step off the boundaries to stay within [lower, upper].
Reflection preserves symmetry, so no Hastings correction is needed.
Fields§
§lower_bound: f64Lower bound (inclusive)
upper_bound: f64Upper bound (inclusive)
Trait Implementations§
Source§impl ProposalStrategy<f64> for ReflectionWalkProposal
impl ProposalStrategy<f64> for ReflectionWalkProposal
Source§fn propose(&self, current: f64, scale: f64, rng: &mut dyn RngCore) -> f64
fn propose(&self, current: f64, scale: f64, rng: &mut dyn RngCore) -> f64
Generate a proposal given the current value and scale.
Source§fn log_proposal_prob(&self, from: T, to: T, scale: f64) -> f64
fn log_proposal_prob(&self, from: T, to: T, scale: f64) -> f64
Log-density
log q(to | from) of proposing to from from at the given
scale. Defaults to 0 for symmetric proposals (the constant cancels in
the Hastings ratio); asymmetric proposals override it.Auto Trait Implementations§
impl Freeze for ReflectionWalkProposal
impl RefUnwindSafe for ReflectionWalkProposal
impl Send for ReflectionWalkProposal
impl Sync for ReflectionWalkProposal
impl Unpin for ReflectionWalkProposal
impl UnsafeUnpin for ReflectionWalkProposal
impl UnwindSafe for ReflectionWalkProposal
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