MapBasedGrid
floodsim.model.grid.MapBasedGrid
final case class MapBasedGrid[T <: GridElement](width: Int, height: Int, elementsMap: Map[Coordinate, T]) extends Grid[T]
Grid implementation backed by an immutable map Coordinate -> T. Requires positive dimensions; the presence of a map entry determines whether a cell is populated.
Value parameters
- elementsMap
-
immutable map from coordinates to elements
- height
-
grid height (>= 1)
- width
-
grid width (>= 1)
Attributes
- Graph
-
- Supertypes
Members list
In this article