The bahaviour of simpcomp can be changed by setting global options, functions for which will be described in the following.
simpcomp can be configured to either enter a break loop when encountering an error or to just log the error and return fail
in the called function. Examples for errors would be a computation failing or a SCSimplicialComplex
object having an inconsistent internal state
> SCErrorBreak ( flag ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Sets whether simpcomp enters a break loop when encountering an error or just returns fail
in the function called.
gap> SCErrorBreak(true); true |
> SCErrorMail ( flag ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Sets whether simpcomp should send an email to the address specified by SCMailSetAddress
(9.2-6) when encountering an error.
gap> SCErrorMail(true); true |
simpcomp comes with an email notification system that can be used for being notified of the progress of lengthy computations (such as reducing a complex via bistellar flips). See below for a descriptions of the mail notification related functions.
> SCMailClearPending ( ) | ( function ) |
Returns: nothing.
Clears a pending mail message.
gap> SCMailClearPending(); |
> SCMailIsEnabled ( ) | ( function ) |
Returns: true
or false
upon success, fail
otherwise.
Returns true
when the mail notification system of simpcomp is enabled, false
otherwise. Default setting is false
.
gap> SCMailIsEnabled(); false |
> SCMailIsPending ( ) | ( function ) |
Returns: true
or false
upon success, fail
otherwise.
Returns true
when an email of the simpcomp email notification system is pending, false
otherwise.
gap> SCMailIsPending(); false |
> SCMailSend ( message[, starttime][,][forcesend] ) | ( function ) |
Returns: true
when the message was sent, false
if it was not send, fail
upon an error.
Tries to send an email to the address specified by SCMailSetAddress
(9.2-6) using the unix program mail
. The optional parameter starttime specifies the starting time (as the integer unix timestamp) a calculation was started (then the duration of the calculation is included in the email), the optional boolean parameter forcewrite can be used to force the sending of an email, even if this violates the minimal email sending interval, see SCMailSetMinInterval
(9.2-8).
gap> SCMailIsEnabled(); true gap> SCMailSend("Hello, this is simpcomp."); true |
> SCMailSendPending ( ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Tries to send a pending email of the simpcomp email notification system. Returns true
on success or if there was no mail pending.
gap> SCMailSendPending(); true |
> SCMailSetAddress ( address ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Sets the email address that should be used to send notification messages and enables the mail notification system by calling SCMailSetEnabled
(9.2-7)(true
).
gap> SCMailSetAddress("johndoe@somehost"); true |
> SCMailSetEnabled ( flag ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Enables or disables the mail notification system of simpcomp. By default it is disabled. Returns fail
if no email message was previously set with SCMailSetAddress
(9.2-6).
gap> SCMailSetAddress("johndoe@somehost"); #enables mail notification true gap> SCMailSetEnabled(false); true |
> SCMailSetMinInterval ( interval ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Sets the minimal time interval in seconds that mail messages can be sent by simpcomp. This prevents a flooding of the specified email address with messages sent by simpcomp. Default is 3600, i.e. one hour.
gap> SCMailSetMinInterval(7200); true |
simpcomp makes use of the GAP internal testing mechanisms and provides the user with a function to test the functionality of the package.
> SCRunTest ( ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Test whether the package simpcomp is functional by calling ReadTest("GAPROOT/pkg/simpcomp/tst/simpcomp.tst");
. The returned value of GAP4stones is a measure of your system performance.
gap> SCRunTest(); + test simpcomp package, version 1.1.21 + GAP4stones: 69988 true |
generated by GAPDoc2HTML