24using BurnedData = std::bitset<static_cast<size_t>(MAX_ROWS) * MAX_COLUMNS>;
51 [[nodiscard]] Idx
rows()
const
120 IntensitySize intensity,
125 const IntensitySize intensity,
140 void save(
const string& dir,
const string& base_name)
const;
145 [[nodiscard]] MathSize
fireSize()
const;
150 [[nodiscard]] map<Location, IntensitySize>::const_iterator
156 [[nodiscard]] map<
Location, IntensitySize>::const_iterator
157 cend() const noexcept;
172 unique_ptr<data::GridMap<DegreesSize>> direction_of_spread_at_max_;
Represents a map of intensities that cells have burned at for a single Scenario.
Definition IntensityMap.h:29
unique_ptr< data::GridMap< IntensitySize > > intensity_max_
Map of intensity that cells have burned at.
Definition IntensityMap.h:166
MathSize fireSize() const
Size of the fire represented by this.
Definition IntensityMap.cpp:267
Idx rows() const
Number of rows in this extent.
Definition IntensityMap.h:51
IntensityMap(const Model &model) noexcept
Constructor.
Definition IntensityMap.cpp:101
void applyPerimeter(const topo::Perimeter &perimeter) noexcept
Set cells in the map to be burned based on Perimeter.
Definition IntensityMap.cpp:134
bool isSurrounded(const Location &location) const
Whether or not all Locations surrounding the given Location are burned.
Definition IntensityMap.cpp:164
Idx columns() const
Number of columns in this extent.
Definition IntensityMap.h:59
void save(const string &dir, const string &base_name) const
Save contents to an ASCII file.
Definition IntensityMap.cpp:250
void burn(const Location &location, IntensitySize intensity, MathSize ros, fs::wx::Direction raz)
Update Location with specified values.
Definition IntensityMap.cpp:194
unique_ptr< data::GridMap< MathSize > > rate_of_spread_at_max_
Map of rate of spread/direction that cells have burned with at max ros.
Definition IntensityMap.h:171
map< Location, IntensitySize >::const_iterator cend() const noexcept
Iterator for underlying GridMap.
Definition IntensityMap.cpp:273
const Model & model_
Model map is for.
Definition IntensityMap.h:162
mutex mutex_
Mutex for parallel access.
Definition IntensityMap.h:33
BurnedData * is_burned_
bitset denoting cells that can no longer burn
Definition IntensityMap.h:176
map< Location, IntensitySize >::const_iterator cbegin() const noexcept
Iterator for underlying GridMap.
Definition IntensityMap.cpp:278
bool hasBurned(const Location &location) const
Whether or not the Location with the given hash can burn.
Definition IntensityMap.cpp:153
bool canBurn(const Location &location) const
Whether or not the Cell with the given hash can burn.
Definition IntensityMap.cpp:149
void ignite(const Location &location)
Mark given location as burned.
Definition IntensityMap.cpp:190
Contains all the immutable information regarding a simulation that is common between Scenarios.
Definition Model.h:134
Definition Location.h:229
Perimeter for an existing fire to initialize a simulation with.
Definition Perimeter.h:24
A Position with a row and column.
Definition Location.h:57
constexpr HashSize hash() const noexcept
Hash derived from row and column.
Definition Location.h:80
Direction with access to degrees or radians.
Definition Weather.h:64