]> gitweb.michael.orlitzky.com - dunshire.git/commit
Add an epsilon_scale() method for games.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 12 Nov 2016 12:35:12 +0000 (07:35 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Nov 2016 20:19:27 +0000 (15:19 -0500)
commitcd77ba5250ed98ece623730c26af845366847487
tree9533c77f43e7ddcccf31db3741d004232d0b26f2
parent60f232a1669856e3b061632ede2509789be1e1d8
Add an epsilon_scale() method for games.

When testing, we often need to know how lenient to be when making
comparisons. Trying to figure out just how lenient has been a huge
source of problems, and ultimately, the scaling factor (applied to
ABS_TOL) probably depends on properties of the solution.

This commit adds a new method, epsilon_scale(), that returns a safe
(very lenient) scaling factor. If things are within epsilon_scale()
times ABS_TOL, we consider then equal, or optimal, or whatever.
dunshire/games.py