]> gitweb.michael.orlitzky.com - dunshire.git/blob - dunshire/options.py
Fix the test script to appease pylint.
[dunshire.git] / dunshire / options.py
1 """
2 A place to collect the various options that "can be passed to the
3 underlying engine." Just kidding, they're constants and you can't
4 change them. But this makes the user interface real simple.
5 """
6
7
8 ABS_TOL = 1e-6
9 """
10 The absolute tolerance used in all "are these numbers equal" and "is
11 this number less than (or equal to) that other number" tests. The CVXOPT
12 default is ``1e-7``, but loosening that a little reduces the number of
13 "unknown" solutions that we get during random testing. Whether or not it
14 improves the solubility of real problems is a question for the
15 philosophers.
16 """
17
18 DEBUG_FLOAT_FORMAT = '%.20f'
19 """
20 The float output format to use when something goes wrong. If we need to
21 produce a random test case, for example, then we need all of the digits
22 of the things involved. If we try to recreate the problem using only,
23 say, the first seven digits of each number, then the resulting game
24 might not reproduce the failure.
25 """
26
27 FLOAT_FORMAT = '%.7f'
28 """
29 The default output format for floating point numbers. It has been
30 chosen to match the ``ABS_TOL``, in the sense that if ``x != y``,
31 then they would not appear different when printed.
32 """