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

    Function bestEffortsByDistance

    • Best efforts over distance: for each target distance, the fastest time over any window covering at least that distance. The distance-axis analogue of the power curve — a two-pointer over cumulative distance keeps the window just ≥ the target while minimising elapsed time, O(n) per distance. Times are clamped non-decreasing across the (ascending) distance list. Walks the arrays: it's a fastest-window search over a derived monotonic axis swept across many target distances — beyond pond's single-window rolling (a multi-window sweep is a candidate pond primitive). hr (optional) yields the mean heart rate over each fastest window. Precondition: distances must be ascending — the > total early-exit and the non-decreasing-time clamp both rely on it (BEST_EFFORT_DISTANCES is).

      Parameters

      • cumDist: Float64Array
      • timeSec: Float64Array
      • distances: number[] = BEST_EFFORT_DISTANCES
      • Optionalhr: Float64Array<ArrayBufferLike>

      Returns DistanceEffort[]