pruneRangeByMinWeight
Drop low-weight range combos and return a compact sparse range.
pruneRangeByMinWeight(range: SparseRangeSpec | Float64Array, minWeight: number): SparseRangeSpec
See Packed card input and SparseRangeSpec where those inputs apply.
Import
const poker = require('poker-calculations');
ESM (Node):
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const poker = require('poker-calculations');
When to use
Use pruneRangeByMinWeight when you need to drop low-weight range combos and return a compact sparse range.
How to use
const poker = require('poker-calculations');
const range = new Float64Array(1326);
range.fill(1 / 1326);
const result = poker.pruneRangeByMinWeight(range, 5);
console.log(result);