DamageCalculatorLike
Trait defining the interface for damage calculation operations in the flood simulation model.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object DamageCalculator
Members list
Value members
Abstract methods
Calculates the average water height across all cells in the grid.
Calculates the average water height across all cells in the grid.
Value parameters
- grid
-
the grid of cells to analyze
Attributes
- Returns
-
the average water height across all cells
Calculates the flooding percentage for a single cell.
Calculates the flooding percentage for a single cell.
Value parameters
- cell
-
the cell to evaluate
Attributes
- Returns
-
the percentage of flooding for the cell (0.0 to 100.0)
Calculates the percentage of houses that are flooded above a given threshold.
Calculates the percentage of houses that are flooded above a given threshold.
Value parameters
- floodThreshold
-
the water height threshold to consider a house as flooded
- grid
-
the grid of cells to analyze
Attributes
- Returns
-
the percentage of flooded houses (0.0 to 100.0)
Calculates the percentage of the entire map that is flooded above a given threshold.
Calculates the percentage of the entire map that is flooded above a given threshold.
Value parameters
- floodThreshold
-
the water height threshold to consider a cell as flooded
- grid
-
the grid of cells to analyze
Attributes
- Returns
-
the percentage of flooded cells (0.0 to 100.0)