Function swapRanges

  • Exchange two ranges of values.

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array

    • i: number

      begin index of first range

    • I: number

      end index of first range (exclusive)

    • j: number

      begin index of second range

    • J: number

      end index of second range (exclusive)

    Returns T[]

    x' | x' = x; x'[i..I] = x[j..J]; x'[j..J] = x[i..I]

Generated using TypeDoc