Function rust_poker::equity_calculator::approx_equity [−][src]
pub fn approx_equity(
hand_ranges: &[HandRange],
board_mask: u64,
n_threads: u8,
stdev_target: f64
) -> Result<Vec<f64>, SimulatorError>
Runs a monte carlo simulation to calculate range vs range equity
Returns the equity for each player
Arguments
hand_ranges
Array of hand rangesboard_mask
64 bit mask of public cardsn_threads
Number of threads to use in simulation- ’stdev_target` Target std deviation for simulation
Example
use rust_poker::hand_range::{HandRange, get_card_mask}; use rust_poker::equity_calculator::approx_equity; let ranges = HandRange::from_strings(["random".to_string(), "random".to_string()].to_vec()); let board_mask = get_card_mask(""); let equities = approx_equity(&ranges, board_mask, 4, 0.001);