squarenet documentationο
Introductionο
SquareNet maps unstructured point clouds to structured grids through a bijective transformation: one point, one cell, no overlap, fully invertible.
The practical payoff: you replace expensive spatial queries (k-NN, radius search, neighborhood graphs) with plain tensor indexing.
Think of it as an alternative to kd-trees, voxelization, rasterization, or graph-based approaches, but with a regular tensor structure allowing for massive parallelisation.
Featuresο
β Works in any dimension
β Handles non-convex geometries and irregular distributions
β Scales to millions of points (seconds, not minutes)
β Compatible with PyTorch and JAX
β Native padding for mismatch between number of grid slots and number of points (since version 1.2)
API