10#include "IntensityMap.h"
18class SpreadData : std::tuple<DurationSize, IntensitySize, ROSSize, Direction, Direction>
22 DurationSize time()
const
24 return std::get<0>(*
this);
26 IntensitySize intensity()
const
28 return std::get<1>(*
this);
32 return std::get<2>(*
this);
36 return std::get<3>(*
this);
40 return std::get<4>(*
this);
44static constexpr size_t FURTHEST_N = 0;
45static constexpr size_t FURTHEST_NNE = 1;
46static constexpr size_t FURTHEST_NE = 2;
47static constexpr size_t FURTHEST_ENE = 3;
48static constexpr size_t FURTHEST_E = 4;
49static constexpr size_t FURTHEST_ESE = 5;
50static constexpr size_t FURTHEST_SE = 6;
51static constexpr size_t FURTHEST_SSE = 7;
52static constexpr size_t FURTHEST_S = 8;
53static constexpr size_t FURTHEST_SSW = 9;
54static constexpr size_t FURTHEST_SW = 10;
55static constexpr size_t FURTHEST_WSW = 11;
56static constexpr size_t FURTHEST_W = 12;
57static constexpr size_t FURTHEST_WNW = 13;
58static constexpr size_t FURTHEST_NW = 14;
59static constexpr size_t FURTHEST_NNW = 15;
60static constexpr size_t NUM_DIRECTIONS = 16;
62static constexpr auto MASK_NE = DIRECTION_N & DIRECTION_NE & DIRECTION_E;
63static constexpr auto MASK_SE = DIRECTION_S & DIRECTION_SE & DIRECTION_E;
64static constexpr auto MASK_SW = DIRECTION_S & DIRECTION_SW & DIRECTION_W;
65static constexpr auto MASK_NW = DIRECTION_N & DIRECTION_NW & DIRECTION_W;
67static constexpr std::array<CellIndex, NUM_DIRECTIONS> DIRECTION_MASKS{
88using array_dists = std::array<DistanceSize, NUM_DIRECTIONS>;
89using array_pts = std::array<InnerPos, NUM_DIRECTIONS>;
91using array_dirs = std::array<MathSize, NUM_DIRECTIONS>;
92using array_cellpts = std::tuple<array_dists, array_pts, array_dirs>;
95 :
public array_cellpts
98 using array_cellpts::array_cellpts;
99 inline const array_dists& distances()
const
101 return std::get<0>(*
this);
103 inline const array_pts& points()
const
105 return std::get<1>(*
this);
107 inline const array_dirs& directions()
const
109 return std::get<2>(*
this);
111 inline array_dists& distances()
113 return std::get<0>(*
this);
115 inline array_pts& points()
117 return std::get<1>(*
this);
119 inline array_dirs& directions()
121 return std::get<2>(*
this);
130 using spreading_points = map<SpreadKey, vector<pair<Location, CellPoints>>>;
141 const XYSize y)
noexcept;
150 const XYSize y)
noexcept;
167 void add_source(
const CellIndex src);
168 CellIndex sources()
const
173 set<XYPos> unique()
const noexcept;
174#ifdef DEBUG_CELLPOINTS
175 size_t size()
const noexcept;
177 bool operator<(
const CellPoints& rhs)
const noexcept;
178 bool operator==(
const CellPoints& rhs)
const noexcept;
179 [[nodiscard]]
Location location()
const noexcept;
198 CellPoints(
const Idx cell_x,
const Idx cell_y)
noexcept;
202using spreading_points = CellPoints::spreading_points;
220 const XYSize y)
noexcept;
222 const BurnedData& unburnable,
224 set<XYPos> unique()
const noexcept;
225#ifdef DEBUG_CELLPOINTS
226 size_t size()
const noexcept;
229 void remove_if(std::function<
bool(
const pair<Location, CellPoints>&)> F)
noexcept;
232 map<Location, CellPoints> map_;
Definition CellPoints.h:96
Definition CellPoints.h:206
Definition CellPoints.h:128
The position within the Environment that a spreading point has.
Definition InnerPos.h:81
The position within a Cell that a spreading point has.
Definition InnerPos.h:59
A single Scenario in an Iteration using a specific FireWeather stream.
Definition Scenario.h:38
Definition CellPoints.h:19
The position within the Environment that a spreading point has.
Definition InnerPos.h:67
Definition Location.h:229
Direction with access to degrees or radians.
Definition Weather.h:64