Commit 04a620d
authored
Refactor MixedBehaviorProfile caching (#703)
* Refactor MixedBehaviorProfile caching
This re-writes the cached quantity calculations for MixedBehaviorProfile:
* Uses the preorder and postorder traversal of nodes provided by the game class;
* Thereby avoids recursion to descend the tree
* Cleanly separates the computation of each vector of quantities (which will be a help for
further optimisation in future when we look at the data structures
used to represent them)
* Because there is a dependency order in the cached quantities,
implements a slightly more sophisticated cache to compute
only what is truly needed.1 parent 87bf52f commit 04a620d
7 files changed
Lines changed: 253 additions & 247 deletions
File tree
- src
- games
- gui
- pygambit
0 commit comments