Module utils

Source

Structs§

EmptyTimeLoad
LenErr

Functions§

awat_regression
awat_regression_plot
calculate_iqr
compare_f64_approx
compare_f64_exact
compare_vecf64_approx
compare_vecf64_exact
discharge_by_index
Return a new vector without the elements associated with the given indices. The indices are expected to be sorted or partially sorted: sort them completely and then take advantage of that. This avoids random indexing-access the vector, which can reduce cache misses and the number of comparisons. This is used for removing bad datetimes and anomalies.
find_anomalies
make_window
mavg
Roll the weighted moving window w over the data v, also filling the NAN values with the weighted average when possible:
mavg_parallel_fold
mavg_parallel_simd
mean_or_nan
min_and_max
read_bad_datetimes
Read a list of bad datetimes to skip, always from RFC 3339 - ISO 8601 format.
setnan_by_index
Set to NAN the elements of the given vector at the given indices. The indices are expected to be sorted or partially sorted: sort them completely and then take advantage of that. This avoids random indexing-access the vector, which can reduce cache misses and the number of comparisons. This is used for removing bad datetimes and anomalies.
suitable_xfmt
If longer than one week, keep year, month and day, drop hours; if not, but longer than one day, add hours. Otherwise, shorter than one day, keep also minutes.