cartulary 0.3.0-alpha.1

The knowledge layer of your project — decisions, issues, docs, all in one place.
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Port: pick an index in `[0, len)` for Monte-Carlo style use cases.
///
/// The forecast use cases need a stream of random indices into the
/// historical-throughput vector. Sourcing that stream — whether from a
/// seeded PRNG or a deterministic test sequence — is an infra concern;
/// the domain only consumes the next index.
pub trait IndexSampler {
    /// Return an index in `[0, len)`. `len` is always strictly positive
    /// when the use case calls this method.
    fn next_index(&mut self, len: usize) -> usize;
}