Function rust_poker::equity_calculator::exact_equity[][src]

pub fn exact_equity(
    hand_ranges: &[HandRange],
    board_mask: u64,
    n_threads: u8
) -> Result<Vec<f64>, SimulatorError>

Calculates exact range vs range equities

Returns the equity for each player

Arguments

  • hand_ranges Array of hand ranges
  • board_mask 64 bit mask of public cards
  • n_threads Number of threads to use in simulation

Example

use rust_poker::hand_range::{HandRange, get_card_mask};
use rust_poker::equity_calculator::exact_equity;
let ranges = HandRange::from_strings(["AA".to_string(), "random".to_string()].to_vec());
let board_mask = get_card_mask("");
let equities = exact_equity(&ranges, board_mask, 4);