ratel_bandit 0.2.3

Rust Implementation of a Muti-armed Bandit Simulator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use num_traits::Num;

/// A trait for common methods required by all counters.
pub trait Counter<T: Num> {
    /// Returns the current value of the counter.
    fn counter(&self) -> &T;

    /// Resets the counter to its initial values.
    fn reset(&mut self);

    /// Updates the counter with a new value.
    fn update(&mut self, n: T);
}