#vec #vector-array #array

flatarray

Implementation of a flattened iterator, that acts as if it still was an iterator of iterator

9 releases (1 stable)

Uses new Rust 2024

1.1.0 May 30, 2025
0.7.1 Apr 10, 2025
0.6.0 Jan 13, 2025
0.5.0 Jan 13, 2025
0.1.0 Jan 13, 2025

#1007 in Data structures

Download history

698 downloads per month
Used in 2 crates

MIT license

28KB
738 lines

FlatArray

This crates contains the code for a cache-friendly datastructure named FlatArray. It mimics the behavior of a Vec<Vec<T>> by allowing the users to iterate over the vectors and can be dereferenced into a &[T]. FlatArray is of fixed size but can be iterated over as if it was a Vec<Vec<T>>, with the help of the iter_arrays and iter_arrays_mut methods.

Dependencies

~0.2–0.8MB
~19K SLoC