Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

1035325 views
1
2
15 Miscellaneous functions
3
4
The behaviour of simpcomp can be changed by setting cetain global options.
5
This can be achieved by the functions described in the following.
6
7
8
15.1 simpcomp logging
9
10
The verbosity of the output of information to the screen during calls to
11
functions of the package simpcomp can be controlled by setting the info
12
level parameter via the function SCInfoLevel (15.1-1).
13
14
15.1-1 SCInfoLevel
15
16
SCInfoLevel( level )  function
17
Returns: true
18
19
Sets the logging verbosity of simpcomp. A level of 0 suppresses all output,
20
a level of 1 lets simpcomp output normal running information, whereas levels
21
of 2 and higher display verbose running information. Examples of functions
22
using more verbose logging are bistellar flip-related functions.
23
24
 Example 
25
gap> SCInfoLevel(3);
26
true
27
gap> c:=SCBdCrossPolytope(3);;
28
gap> SCReduceComplex(c); 
29
#I round 0, move: [ [ 4, 5 ], [ 1, 2 ] ]
30
F: [ 6, 12, 8 ]
31
#I round 1, move: [ [ 5 ], [ 1, 2, 3 ] ]
32
F: [ 5, 9, 6 ]
33
#I round 1
34
Reduced complex, F: [ 5, 9, 6 ]
35
#I round 2, move: [ [ 3 ], [ 1, 2, 6 ] ]
36
F: [ 4, 6, 4 ]
37
#I round 2
38
Reduced complex, F: [ 4, 6, 4 ]
39
#I SCReduceComplexEx: computed locally minimal complex after 3 rounds.
40
[ true, [SimplicialComplex
41
 
42
 Properties known: Dim, FacetsEx, Name, Vertices.
43
 
44
 Name="unnamed complex 3"
45
 Dim=2
46
 
47
 /SimplicialComplex], 3 ]
48

49
50
51
15.2 Email notification system
52
53
simpcomp comes with an email notification system that can be used for being
54
notified of the progress of lengthy computations (such as reducing a complex
55
via bistellar flips). See below for a description of the mail notification
56
related functions. Note that this might not work on non-Unix systems.
57
58
See SCReduceComplexEx (9.2-14) for an example computation using the email
59
notification system.
60
61
15.2-1 SCMailClearPending
62
63
SCMailClearPending( )  function
64
Returns: nothing.
65
66
Clears a pending mail message.
67
68
 Example 
69
 gap> SCMailClearPending();
70
 
71
 
72

73
74
15.2-2 SCMailIsEnabled
75
76
SCMailIsEnabled( )  function
77
Returns: true or false upon success, fail otherwise.
78
79
Returns true when the mail notification system of simpcomp is enabled, false
80
otherwise. Default setting is false.
81
82
 Example 
83
 gap> SCMailSetAddress("johndoe@somehost"); #enables mail notification
84
 true
85
 gap> SCMailIsEnabled();
86
 true
87
 
88

89
90
15.2-3 SCMailIsPending
91
92
SCMailIsPending( )  function
93
Returns: true or false upon success, fail otherwise.
94
95
Returns true when an email of the simpcomp email notification system is
96
pending, false otherwise.
97
98
 Example 
99
 gap> SCMailIsPending();
100
 false
101
 
102

103
104
15.2-4 SCMailSend
105
106
SCMailSend( message[, starttime][, forcesend] )  function
107
Returns: true when the message was sent, false if it was not send, fail
108
upon an error.
109
110
Tries to send an email to the address specified by SCMailSetAddress (15.2-6)
111
using the Unix program mail. The optional parameter starttime specifies the
112
starting time (as the integer Unix timestamp) a calculation was started
113
(then the duration of the calculation is included in the email), the
114
optional boolean parameter forcesend can be used to force the sending of an
115
email, even if this violates the minimal email sending interval, see
116
SCMailSetMinInterval (15.2-8).
117
118
 Example 
119
 gap> SCMailSetAddress("johndoe@somehost"); #enables mail notification
120
 true
121
 gap> SCMailIsEnabled();
122
 true
123
 gap> SCMailSend("Hello, this is simpcomp.");
124
 true
125
 
126

127
128
15.2-5 SCMailSendPending
129
130
SCMailSendPending( )  function
131
Returns: true upon success, fail otherwise.
132
133
Tries to send a pending email of the simpcomp email notification system.
134
Returns true on success or if there was no mail pending.
135
136
 Example 
137
 gap> SCMailSendPending();
138
 true
139
 
140

141
142
15.2-6 SCMailSetAddress
143
144
SCMailSetAddress( address )  function
145
Returns: true upon success, fail otherwise.
146
147
Sets the email address that should be used to send notification messages and
148
enables the mail notification system by calling SCMailSetEnabled
149
(15.2-7)(true).
150
151
 Example 
152
 gap> SCMailSetAddress("johndoe@somehost");
153
 true
154
 
155

156
157
15.2-7 SCMailSetEnabled
158
159
SCMailSetEnabled( flag )  function
160
Returns: true upon success, fail otherwise.
161
162
Enables or disables the mail notification system of simpcomp. By default it
163
is disabled. Returns fail if no email message was previously set with
164
SCMailSetAddress (15.2-6).
165
166
 Example 
167
 gap> SCMailSetAddress("johndoe@somehost"); #enables mail notification
168
 true
169
 gap> SCMailSetEnabled(false);
170
 true
171
 
172

173
174
15.2-8 SCMailSetMinInterval
175
176
SCMailSetMinInterval( interval )  function
177
Returns: true upon success, fail otherwise.
178
179
Sets the minimal time interval in seconds that mail messages can be sent by
180
simpcomp. This prevents a flooding of the specified email address with
181
messages sent by simpcomp. Default is 3600, i.e. one hour.
182
183
 Example 
184
 gap> SCMailSetMinInterval(7200);
185
 true
186
 
187

188
189
190
15.3 Testing the functionality of simpcomp
191
192
simpcomp makes use of the GAP internal testing mechanisms and provides the
193
user with a function to test the functionality of the package.
194
195
15.3-1 SCRunTest
196
197
SCRunTest( )  function
198
Returns: true upon success, fail otherwise.
199
200
Test whether the package simpcomp is functional by calling
201
Test("GAPROOT/pkg/simpcomp/tst/simpcomp.tst",rec(compareFunction :=
202
"uptowhitespace"));. The returned value of GAP4stones is a measure of your
203
system performance and differs from system to system.
204
205
 Example 
206
 gap> SCRunTest();
207
 simpcomp package test
208
 GAP4stones: 69463
209
 true
210
 
211

212
213
On a modern computer, the function SCRunTest should take about a minute to
214
complete when the packages GRAPE [Soi12] and homology [DHSW11] are
215
available. If these packages are missing, the testing will take slightly
216
longer.
217
218
219