floodsim.model.grid
Members list
Type members
Classlikes
Represents a two-dimensional coordinate on a discrete Cartesian grid. Coordinates are zero-based: x and y start at 0 and increase to the right (x) and downward (y).
Represents a two-dimensional coordinate on a discrete Cartesian grid. Coordinates are zero-based: x and y start at 0 and increase to the right (x) and downward (y).
Value parameters
- x
-
x-axis index of the cell
- y
-
y-axis index of the cell
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Extension of Grid providing distance-based operations. This trait adds spatial awareness to grid operations by computing distances to not-full cells, enabling dynamic neighbor search and efficient water distribution All operations are immutable: transformation methods return new instances.
Extension of Grid providing distance-based operations. This trait adds spatial awareness to grid operations by computing distances to not-full cells, enabling dynamic neighbor search and efficient water distribution All operations are immutable: transformation methods return new instances.
Type parameters
- T
-
grid element type
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class MapBasedDistanceGrid[T]
Factory for building DistanceGrid.
Factory for building DistanceGrid.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DistanceGrid.type
Abstraction of a 2D grid indexed by Coordinate containing elements of type T.
Abstraction of a 2D grid indexed by Coordinate containing elements of type T.
Type parameters
- T
-
type of the elements, constrained to GridElement
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
DistanceGrid implementation backed by an internal MapBasedGrid. Provides efficient distance-based neighbor searches using a multi-source BFS computed from all not-full cells. The distance map is lazily evaluated and cached to optimize repeated neighbor queries during flood propagation. Transparently exports properties and methods of the internal grid (width, height, getElementAt, elementsMap) for seamless integration with existing grid operations.
DistanceGrid implementation backed by an internal MapBasedGrid. Provides efficient distance-based neighbor searches using a multi-source BFS computed from all not-full cells. The distance map is lazily evaluated and cached to optimize repeated neighbor queries during flood propagation. Transparently exports properties and methods of the internal grid (width, height, getElementAt, elementsMap) for seamless integration with existing grid operations.
Type parameters
- T
-
element type
Value parameters
- grid
-
underlying immutable grid
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait DistanceGrid[T]trait Grid[T]class Objecttrait Matchableclass AnyShow all
Grid implementation backed by an immutable map Coordinate -> T. Requires positive dimensions; the presence of a map entry determines whether a cell is populated.
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
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Grid[T]class Objecttrait Matchableclass AnyShow all
Types
Immutable map from Coordinate to non-negative distance.