Function onejoker::cards::hashes::ojh_bitfield_mp5_stripped
source ยท pub fn ojh_bitfield_mp5_stripped(cards: &[Card]) -> u32
Expand description
wiki | Convert bitfield to MPH Given a bitfield with exactly 5 bits set, return the lexicographic index of that particular set of bits for minimal perfect hash. Requires Stripped deck, 5 cards.
use onejoker::prelude::*;
use onejoker::cards::hashes::*;
let d = Deck::new(DeckType::Stripped);
let h = d.new_hand().init(hand!("7s","7d","7c","7h","8c"));
assert_eq!(1, ojh_bitfield_mp5_stripped(&h[..]));