ariasanovsky / azdopt

An implementation of Alpha Zero for discrete optimization problems.
7 stars 0 forks source link

Refactor `INTMinTree` to return a `Vec<Entry>` #29

Closed ariasanovsky closed 1 year ago

ariasanovsky commented 1 year ago

Currently, we make expensive key clones. With the BTreeMap tree, this is necessary to avoid having a & to data under a &mut.

The cost of this is high, including many temporary Vec's (c.f. ActionsTaken).

To resolve this:

ariasanovsky commented 1 year ago

refactor INTTransitions to hold a Vec instead of Vec<(ActionsTaken, ...)> Used a Vec<(&mut StateData, ...)> instead due to Entry semantics.