Expand description
Common routines for handling input data.
Traits§
- Insert
- A trait which provides a method to insert a key and value into a map
Functions§
- deserialise_
proportion_ nonzero - Read a Dimensionless float, checking that it is between 0 and 1
- format_
items_ with_ cap - Format a list of items with a cap on display count for error messages
- input_
err_ msg - Format an error message to include the file path. To be used with
anyhow::Context. - is_
sorted_ and_ unique - Check whether an iterator contains values that are sorted and unique
- load_
commodity_ graphs - Load commodity flow graphs for a model.
- load_
model - Read a model from the specified directory.
- read_
csv - Read a series of type
Ts from a CSV file. - read_
csv_ optional - Read a series of type
Ts from a CSV file. - read_
toml - Parse a TOML file at the specified path.
- try_
insert - Insert a key-value pair into a map implementing the
Inserttrait if the key does not already exist.