pub struct Folded<'a> {
pub clock: Clock,
pub result: HashMap<&'a str, HashMap<&'a str, u8>>,
pub uses: HashMap<&'a str, HashSet<&'a str>>,
pub repos: HashMap<&'a str, HashSet<&'a str>>,
pub regret: Vec<(&'a str, &'a str, f64)>,
pub tested: HashMap<&'a str, HashSet<&'a str>>,
pub corrections: HashMap<&'a str, HashSet<i64>>,
}Expand description
What derive reads from the outcomes, before any lesson or session is applied. Every part is a max, a
min or a union per key, so it is the same whatever the order of the lines and however often one
repeats: facts.rs folds it incrementally and hands it over in this form.
Fields§
§clock: Clock§result: HashMap<&'a str, HashMap<&'a str, u8>>Per (lesson, session): its result_of, the largest.
uses: HashMap<&'a str, HashSet<&'a str>>Per lesson: the sessions whose result was a change (a later correction in that session still deposited the change), and the repos of those changes.
repos: HashMap<&'a str, HashSet<&'a str>>§regret: Vec<(&'a str, &'a str, f64)>Per (lesson, deciding session): (lesson, session, the credit of the regrets that blame it, each
regret once: blame). A regret’s credit is the largest of its duplicate lines (merging two logs
merges memory), the session it blames the first line’s.
tested: HashMap<&'a str, HashSet<&'a str>>Per lesson: the sessions whose own tests went green after it was asked.
corrections: HashMap<&'a str, HashSet<i64>>Per session: the engineer’s corrections the log shows (regret_cap).