Function createFp

  • Creates a FarthestPoint.

    Parameters

    • k: number

      The current index.

    • M: number

      The length of the first array.

    • routes: Uint32Array

      The routes array.

    • diffTypesPtrOffset: number

      The offset of the diff types in the routes array.

    • ptr: number

      The current pointer.

    • Optionalslide: FarthestPoint

      The slide FarthestPoint.

    • Optionaldown: FarthestPoint

      The down FarthestPoint.

    Returns FarthestPoint

    A FarthestPoint.

    import { createFp } from "@std/internal/diff";
    import { assertEquals } from "@std/assert";

    assertEquals(
    createFp(
    0,
    0,
    new Uint32Array(0),
    0,
    0,
    { y: -1, id: 0 },
    { y: 0, id: 0 },
    ),
    { y: -1, id: 1 },
    );