floodsim.model.logic.BaseMapGenerator
Base trait providing common functionality for map generation. Contains utility methods for random selection of the center of the generation and Gaussian weight calculations used by both ground and sky map generators.
Attributes
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Members list
Calculates Gaussian weight for distance-based probability calculations.
Calculates Gaussian weight for distance-based probability calculations.
Value parameters
distance
the distance from center
mean
the mean of the Gaussian distribution
stdDev
the standard deviation of the Gaussian distribution
Attributes
Returns
the Gaussian weight value
Common grid generation method that builds a grid based on a selection function generalizing the element type for any possible grid generation.
Common grid generation method that builds a grid based on a selection function generalizing the element type for any possible grid generation.
Type parameters
T
the type of elements in the grid
Value parameters
selector
a function that selects an element based on normalized distance and random value
size
the size of the grid (width and height)
Attributes
Returns
a map of coordinates to elements