@pond-ts/fit API Reference
    Preparing search index...

    Function segmentsInRange

    • The contiguous track pieces where a per-sample channel falls within [lo, hi] (inclusive) — the selection driver behind zone / power-distribution highlighting. A value predicate over the series yields the scattered stretches of the ride that match (e.g. "every part in the Tempo HR band"). Non-finite samples are out of range (they break a run). cumDist and values are sample-aligned. Adjacent runs separated by ≤ bridgeMeters of out-of-range distance merge into one (default 0 = faithful, no merge) so a momentary excursion doesn't shatter the selection into hundreds of slivers. Each run spans [cum at its first in-range sample, cum at its last]; a lone sample is a zero-length segment at its point.

      Run-length encoding of a predicate over a value column. pond has no contiguous-run / RLE-by-predicate primitive yet — a scan / segmentation family is a candidate pond primitive; until then this walks the arrays.

      Parameters

      • cumDist: Float64Array
      • values: ArrayLike<number>
      • lo: number
      • hi: number
      • bridgeMeters: number = 0

      Returns Segment[]