2#ifndef FS_FIREWEATHER_H
3#define FS_FIREWEATHER_H
10using SurvivalMap = array<vector<float>, NUMBER_OF_FUELS>;
23 FireWeather(
const set<const FuelType*>& used_fuels,
const map<Day, FwiWeather>& data);
25 const set<const FuelType*>& used_fuels,
28 vector<FwiWeather> weather_by_hour_by_day
49 const set<const FuelType*>& used_fuels,
65 [[nodiscard]] ptr<const FwiWeather>
at(
const DurationSize time)
const;
73 const DurationSize time,
74 const FuelCodeSize& in_fuel
90 [[nodiscard]]
const vector<ptr<const FwiWeather>>&
getWeather()
104 const set<const FuelType*>& used_fuels,
107 vector<ptr<const FwiWeather>>&& weather_by_hour_by_day
141 for (Day day = lhs.
minDate() +
static_cast<Day
>(1); day <= lhs.
maxDate(); ++day)
143 for (
auto hour = 0; hour < DAY_HOURS; ++hour)
145 const auto time =
static_cast<DurationSize
>(day) + hour / 24.0;
146 if (lhs.
at(time) != rhs.
at(time))
160[[nodiscard]]
constexpr bool operator!=(
const FireWeather& lhs,
const FireWeather& rhs)
162 return !(lhs == rhs);
A stream of weather that gets used by a Scenario every Iteration.
Definition FireWeather.h:15
SurvivalMap survival_probability_
Probability of survival for fuels fuel at each time.
Definition FireWeather.h:118
ThresholdSize survivalProbability(const DurationSize time, const FuelCodeSize &in_fuel) const
Probability of survival in given fuel at given time.
Definition FireWeather.cpp:673
const vector< ptr< const FwiWeather > > & getWeather()
Weather by hour by day.
Definition FireWeather.h:90
ptr< const FwiWeather > at(const DurationSize time) const
Get FwiWeather for given time.
Definition FireWeather.cpp:666
constexpr Day minDate() const
Minimum date present in FireWeather.
Definition FireWeather.h:80
vector< ptr< const FwiWeather > > weather_by_hour_by_day_
FwiWeather by hour by Day.
Definition FireWeather.h:114
Day max_date_
Maximum date present in stream.
Definition FireWeather.h:126
Day min_date_
Minimum date present in stream.
Definition FireWeather.h:122
constexpr Day maxDate() const
Maximum date present in FireWeather.
Definition FireWeather.h:85
FireWeather(const set< const FuelType * > &used_fuels, const map< Day, FwiWeather > &data)
Constructor.
Definition FireWeather.cpp:562
An FBP fuel type.
Definition FuelType.h:42
Drought Code value.
Definition FWI.h:58
Duff Moisture Code value.
Definition FWI.h:34
Fine Fuel Moisture Code value.
Definition FWI.h:12
Wind with a Speed and Direction.
Definition Weather.h:59