Skip to content

Commit 96d29ac

Browse files
committed
[doc] Document dictionary
1 parent 72b5d48 commit 96d29ac

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

Cell2Fire/DataGenerator.cpp

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,29 @@ separator()
3030
#endif
3131
}
3232

33-
// Reads fbp_lookup_table.csv and creates dictionaries for the fuel types and
34-
// cells' ColorsDict
33+
3534
/**
36-
*
35+
* @brief Reads lookup_table.csv and creates dictionaries for the fuel types and cell's ColorsDict.
36+
*
37+
* The function will look for either `spain_lookup_table.csv`, `kitral_lookup_table.csv` or `fbp_lookup_table.csv`
38+
* in the input instance directory, depending on the chosen model.
39+
*
40+
* This file should have the following columns:
41+
* - grid_value: number id for fuel type within grid
42+
* - export_value: number id for fuel type
43+
* - descriptive_name: description of fuel type
44+
* - fuel_type: code for fuel type
45+
* - r: red
46+
* - g: green
47+
* - b: blue
48+
* - h: hue
49+
* - s: saturation
50+
* - l: lightness
51+
*
52+
* The function creates a fuel type map `<grid_value, fuel_type>` and a color map `<grid_value, r, g, b, 1.0>`
53+
*
3754
* @param filename Name of file containing the lookup table for the chosen simulation model
38-
* @return
55+
* @return a tuple with a mapping of fuel code per fuel number id, and a mapping of color per fuel number id.
3956
*/
4057
std::tuple<std::unordered_map<std::string, std::string>,
4158
std::unordered_map<std::string, std::tuple<float, float, float, float>>>

0 commit comments

Comments
 (0)