Collections::DenseGrid(T)
Inherits Enumerable < Reference < Object
A dense, fixed-size 2D grid backed by a flat buffer.
Where Grid is about traversal (neighbours, flood fill, shortest
paths), DenseGrid is a mutable numeric canvas: O(1) cell access,
rectangle updates, and whole-grid reductions. The right tool for
"apply operations to regions, then tally the cells" puzzles.
Follows the same (row, col) convention as Grid. Includes
Enumerable(T), so sum, count, min/max, tally, etc. are
all available.
Constructors
Instance methods
cols
SourceSet every cell in the inclusive rectangle to value.
rows
Source