matchIntervals
matchIntervals(
intervalsFrom,intervalsTo,options?):Uint32Array<ArrayBufferLike>
Defined in: packages/pleco-xa/src/sequence/matching.js:97
Match one set of time intervals to another, maximizing Jaccard similarity.
Parameters
Section titled “Parameters”intervalsFrom
Section titled “intervalsFrom”number[][]
(n, 2) source intervals.
intervalsTo
Section titled “intervalsTo”number[][]
(m, 2) target intervals.
options?
Section titled “options?”strict?
Section titled “strict?”boolean = true
if true, throw when a query interval is disjoint from every target; if false, match the closest disjoint target instead.
Returns
Section titled “Returns”Uint32Array<ArrayBufferLike>
for each source interval, the matched target index.