DamageCalculatorLike

floodsim.model.report.DamageCalculatorLike
sealed trait DamageCalculatorLike

Trait defining the interface for damage calculation operations in the flood simulation model.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def averageWaterHeight(grid: Grid[Cell]): Double

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

def floodedCellPercentage(cell: Cell): Double

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)

def floodedHousesPercentage(grid: Grid[Cell], floodThreshold: Double): Double

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)

def floodedMapPercentage(grid: Grid[Cell], floodThreshold: Double): Double

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)