Expand description
Stochasta aims to be a simple stochastic analysis library.
Example
use stochasta::CardDeck;
use stochasta::Probability;
let coin = CardDeck::from(vec!["heads", "tails"]);
assert_eq!(coin.size(), 2);
assert_eq!(coin.probability(&"heads"), Probability::new(1, 2));
assert_eq!(coin.probability(&"tails"), Probability::new(1, 2));
Structs
A deck of cards.
A representation of a sequence of drawn cards.
A representation of a card drawing process.
Constants
A probability of 100%.
A probability of 0%.
Type Definitions
The probability of a certain event