#2d-grid #grid #2d #sparse-grid

sark_grids

A set of grids for storing and accessing data in a grid-like way

23 releases

new 0.6.0 Feb 18, 2025
0.5.9 Mar 17, 2024
0.5.8 Jul 12, 2023
0.5.7 Mar 6, 2023
0.2.6 Mar 8, 2022

#11 in #2d-grid

Download history 13/week @ 2024-10-28 13/week @ 2024-11-04 18/week @ 2024-11-18 26/week @ 2024-11-25 38/week @ 2024-12-02 86/week @ 2024-12-09 31/week @ 2024-12-16 8/week @ 2024-12-30 23/week @ 2025-01-06 27/week @ 2025-01-13 31/week @ 2025-01-20 21/week @ 2025-01-27 48/week @ 2025-02-03 48/week @ 2025-02-10

153 downloads per month
Used in 5 crates (3 directly)

MIT license

110KB
2.5K SLoC

License: MIT Crates.io docs

A set of grids for storing and accessing data in a grid-like way.

This crate provides three types of grids:

  • Grid: A dense grid that stores it's internal data in a Vec. The size of the grid is constant and elements cannot be removed, only changed. Provides fast iteration and access speed.

  • SparseGrid: A grid that stores it's internal data in a BTreeMap. Elements don't take up any memory until they're inserted and can be removed as needed, but iteration and access speed will be slower than a Grid for large full grids.

  • WorldGrid: A utility for translating between aligned grid points and world space.


lib.rs:

A set of grids for storing and accessing data in a grid-like way.

Dependencies

~4MB
~127K SLoC