d3_quadtree library
d3-quadtree 3.0.1 in native, fully statically typed Dart with no Flutter import (ADR 0011, D3 ADR 0019).
Exports every pure library of the port without show/hide combinators so
it compiles for the Dart VM, AOT, JavaScript, and WebAssembly with zero
runtime dependencies.
Classes
-
Quadtree<
T> -
A two-dimensional recursive spatial subdivision tree for data of type
T. -
QuadtreeInternalNode<
T> -
An internal node of a Quadtree holding four optional child quadrants:
nw(0, top-left),ne(1, top-right),sw(2, bottom-left), andse(3, bottom-right). -
QuadtreeLeafNode<
T> -
A leaf node of a Quadtree storing data and an optional next leaf for
coincident points at the exact same
(x, y)coordinates. -
QuadtreeNode<
T> - A node in a Quadtree: either a QuadtreeInternalNode subdividing space into four quadrants, or a QuadtreeLeafNode storing a datum and an optional linked list of coincident data.
-
QuadtreeQuad<
T> -
A traversal frame pairing a QuadtreeNode with its quadrant bounds
([x0], [y0])to([x1], [y1]).
Constants
- d3QuadtreeVersion → const String
-
The pinned upstream version of
d3-quadtree.
Functions
-
defaultQuadtreeX(
(double, double) d) → double -
Default x-coordinate accessor for
(double, double)point records. -
defaultQuadtreeY(
(double, double) d) → double -
Default y-coordinate accessor for
(double, double)point records. -
quadtree(
[Iterable< (double, double)> ? data, QuadtreeAccessor<(double, double)> ? x, QuadtreeAccessor<(double, double)> ? y]) → Quadtree<(double, double)> -
Creates a new quadtree for
(double, double)points with optional initialdataand optionalx/ycoordinate accessors (defaulting to defaultQuadtreeX and defaultQuadtreeY). -
quadtreeBy<
T> ({required QuadtreeAccessor< T> x, required QuadtreeAccessor<T> y, Iterable<T> ? data}) → Quadtree<T> -
Creates a new quadtree for arbitrary datum type
Twith requiredxandycoordinate accessors and optional initialdata.
Typedefs
-
QuadtreeAccessor<
T> = double Function(T datum) -
Accessor extracting a numeric coordinate from a datum of type
T. - QuadtreeExtent = ((double, double), (double, double))
-
Bounding extent of a Quadtree:
((x0, y0), (x1, y1)). -
QuadtreeVisitAfterCallback<
T> = void Function(QuadtreeNode< T> node, double x0, double y0, double x1, double y1) - Post-order traversal callback for Quadtree.visitAfter.
-
QuadtreeVisitCallback<
T> = bool Function(QuadtreeNode< T> node, double x0, double y0, double x1, double y1) - Pre-order traversal callback for Quadtree.visit.