Skip to main content

rangeTopCombos

List the highest-weight combos in a range.

rangeTopCombos(range: SparseRangeSpec | Float64Array, k: number): RangeComboWeight[]

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 rangeTopCombos when you need to list the highest-weight combos in a range.

How to use

const poker = require('poker-calculations');
const range = new Float64Array(1326);
range.fill(1 / 1326);

const result = poker.rangeTopCombos(range, 5);
console.log(result);

See also

materializeVillainRangeAfterBlockers · Sparse range input