pub struct ArmStats {
pub pulls: u64,
pub total_reward: f64,
pub mean_reward: f64,
}Available on crate feature
bandit only.Expand description
A snapshot of a single arm’s statistics.
Produced by Bandit::arm_stats for
diagnostics. All fields are plain values — this struct does not borrow from
the bandit.
Fields§
§pulls: u64How many times this arm has been pulled.
total_reward: f64The total reward accumulated by this arm.
mean_reward: f64The mean reward of this arm (total_reward / pulls), or 0.0 if the
arm has never been pulled.
Implementations§
Trait Implementations§
impl Copy for ArmStats
impl StructuralPartialEq for ArmStats
Auto Trait Implementations§
impl Freeze for ArmStats
impl RefUnwindSafe for ArmStats
impl Send for ArmStats
impl Sync for ArmStats
impl Unpin for ArmStats
impl UnsafeUnpin for ArmStats
impl UnwindSafe for ArmStats
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