Function quadtree

  • Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. If data is specified, adds the specified array of data to the quadtree.

    Type Parameters

    • T = [number, number]

    Parameters

    • Optional data: T[]

    Returns Quadtree<T>

  • Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. Adds the specified array of data to the quadtree. Sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree.

    Type Parameters

    • T = [number, number]

    Parameters

    • data: T[]
    • x: ((d) => number)
        • (d): number
        • Parameters

          • d: T

          Returns number

    • y: ((d) => number)
        • (d): number
        • Parameters

          • d: T

          Returns number

    Returns Quadtree<T>