pub struct Closure {
pub reached: BTreeSet<String>,
pub obtained: BTreeSet<Grant>,
pub obtained_when: BTreeMap<String, BTreeSet<Grant>>,
}Expand description
The monotone reachability closure of a layout graph.
Exactly Dormans’ loop, and exactly §3.2: beats grant, edges demand. Deterministic, linear in the number of edges times the number of rounds, and optimistic in every direction it cannot decide — which is one property, stated once, rather than a list of exceptions:
- it is branch-blind, so a campaign whose branch points set mutually exclusive flags can reach a node no single playthrough reaches;
- a beat’s grants include everything the campaign fires when that objective
completes, including a
talk-to’s whole dialogue tree, because talking is what a body does at the place the speaker stands.
The optimism can only under-report at graph time; the stage-5 battery is
branch-aware over bytes and is what stops it shipping a broken world. If a
campaign’s graph-stage green turns into a repeated stage-5 red on
branch-gated nodes, this closure gains branch awareness from
compiler::flow’s existing branch enumeration — that is the trigger, and
before it fires the simple closure is the cheaper instrument.
Fields§
§reached: BTreeSet<String>Every node a body can be at.
obtained: BTreeSet<Grant>Everything a body can be holding once the fixpoint settles.
obtained_when: BTreeMap<String, BTreeSet<Grant>>Per node, what was already obtained when that node was first reached.
The set DW0819 judges a strand against.
Implementations§
Source§impl Closure
impl Closure
Sourcepub fn satisfied(gating: Option<&EdgeGating>, held: &BTreeSet<Grant>) -> bool
pub fn satisfied(gating: Option<&EdgeGating>, held: &BTreeSet<Grant>) -> bool
True if gating is satisfied by held.
Sourcepub fn run(graph: &LayoutGraphContent, grants: &Grants) -> Closure
pub fn run(graph: &LayoutGraphContent, grants: &Grants) -> Closure
Run the closure from entry, with grants saying what a reached node
hands a body and quest_grants what completing a quest does.