/** * Splits a group of peaks into smaller subgroups whose size is approximately * limited by `maxNumberOfPeaks`. * * If the group contains more peaks than allowed, the function identifies the * largest normalized gaps between adjacent peaks and uses them as split points. * * The gap score is computed as: * * `score = distanceBetweenCenters / averagePeakWidth` * * where: * - `distanceBetweenCenters = peak[i + 1].x - peak[i].x` * - `averagePeakWidth = (peak[i].width + peak[i + 1].width) / 2` * * Larger scores indicate that two neighboring peaks are well separated * relative to their widths, making them good candidates for dividing the * fitting problem into independent subgroups. * * The algorithm: * 1. Computes the number of cuts required. * 2. Scores every boundary between adjacent peaks. * 3. Selects the boundaries with the largest scores. * 4. Splits the original group at those boundaries. * @param group - Ordered collection of peaks. Peaks should be sorted by * increasing `x` position before calling this function. * @param maxNumberOfPeaks - Desired maximum number of peaks per subgroup. * If the group size is less than or equal to this value, no splitting occurs. * @returns An array of peak subgroups. The returned groups preserve the * original peak ordering. */ export declare function splitGroup(group: T[], maxNumberOfPeaks: number): T[][]; //# sourceMappingURL=splitGroup.d.ts.map