Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 19204
1
r"""
2
Controls for checking, timing and tracing
3
==========================================
4
5
The ``cayley_graph_controls`` module defines controls for checking, timing and tracing
6
that can be set and used anywhere they are imported.
7
8
AUTHORS:
9
10
- Paul Leopardi (2016-08-21): initial version
11
12
"""
13
#*****************************************************************************
14
# Copyright (C) 2016-2017 Paul Leopardi [email protected]
15
#
16
# Distributed under the terms of the GNU General Public License (GPL)
17
# as published by the Free Software Foundation; either version 2 of
18
# the License, or (at your option) any later version.
19
# http://www.gnu.org/licenses/
20
#*****************************************************************************
21
22
23
checking = False
24
r"""
25
Enable built-in diagnostic tests that may be time consuming.
26
27
EXAMPLE:
28
29
::
30
31
sage: import boolean_cayley_graphs.cayley_graph_controls as controls
32
sage: controls.checking = True
33
sage: if controls.checking:
34
....: print("Checking!")
35
....:
36
Checking!
37
"""
38
39
40
timing = False
41
r"""
42
Enable timers.
43
44
EXAMPLE:
45
46
::
47
48
sage: import boolean_cayley_graphs.cayley_graph_controls as controls
49
sage: controls.timing = True
50
sage: if controls.timing:
51
....: print("Timing!")
52
....:
53
Timing!
54
"""
55
56
57
verbose = False
58
r"""
59
Increase verbosity: print extra details.
60
61
EXAMPLE:
62
63
::
64
65
sage: import boolean_cayley_graphs.cayley_graph_controls as controls
66
sage: controls.verbose = True
67
sage: if controls.verbose:
68
....: print("This message is verbose.")
69
....:
70
This message is verbose.
71
"""
72
73