]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
Add an options module to consolidate a few random "settings."
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 10 Oct 2016 01:58:40 +0000 (21:58 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 10 Oct 2016 02:36:20 +0000 (22:36 -0400)
src/dunshire/options.py [new file with mode: 0644]

diff --git a/src/dunshire/options.py b/src/dunshire/options.py
new file mode 100644 (file)
index 0000000..03518d8
--- /dev/null
@@ -0,0 +1,18 @@
+"""
+A place to collect the various options that "can be passed to the
+underlying engine." Just kidding, they're constants and you can't
+change them. But this makes the user interface real simple.
+"""
+
+# The absolute tolerance used in all "are these numbers equal" and "is
+# this number less than (or equal to) that other number" tests.
+ABS_TOL = 1e-7
+
+# The default output format for floating point numbers. It has been
+# chosen to match the ABS_TOL, in the sense that if x != y, then they
+# would not appear different when printed.
+FLOAT_FORMAT = '%.7f'
+
+# The underlying CVXOPT solver can output debug information, and I
+# guess, so could we. But we don't want to because it's ugly.
+VERBOSE = False