UNPKG

higlass

Version:

HiGlass Hi-C / genomic / large data viewer

13 lines (12 loc) 668 B
export default selectedItemsToCumWeights; /** * Compute the cumulative normalized weights associated with a * potentially 2d array of selected item indices. * * @param {Array<unknown>} selectedItems - The 1d or 2d array of items or groups of items. * @param {boolean} withRelativeSize - Does a group of indices count as 1 unit size or is its size relative to the group size? * @returns {Float64Array} The array of cumulative weights, one for each item. * * Sums to 1 before the cumulative sum step (i.e. the final array element will be 1). */ declare function selectedItemsToCumWeights(selectedItems: Array<unknown>, withRelativeSize: boolean): Float64Array;