  
  [1X10 Miscellaneous functions[0X
  
  The  bahaviour  of  [5Xsimpcomp[0m  can  be  changed  by  setting  global options,
  functions for which will be described in the following.
  
  
  [1X10.1 [5Xsimpcomp[1X error handling[0X
  
  [5Xsimpcomp[0m can be configured to either enter a break loop when encountering an
  error  or  to  just  log  the  error and return [9Xfail[0m in the called function.
  Examples  for errors would be a computation failing or a [10XSCSimplicialComplex[0m
  object having an inconsistent internal state
  
  [1X10.1-1 SCErrorBreak[0m
  
  [2X> SCErrorBreak( [0X[3Xflag[0X[2X ) _____________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Sets whether [5Xsimpcomp[0m enters a break loop when encountering an error or just
  returns [9Xfail[0m in the function called.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCErrorBreak(true);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.1-2 SCErrorMail[0m
  
  [2X> SCErrorMail( [0X[3Xflag[0X[2X ) ______________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Sets  whether  [5Xsimpcomp[0m  should  send  an  email to the address specified by
  [2XSCMailSetAddress[0m ([14X10.2-6[0m) when encountering an error.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCErrorMail(true);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X10.2 Email notification system[0X
  
  [5Xsimpcomp[0m  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.
  
  [1X10.2-1 SCMailClearPending[0m
  
  [2X> SCMailClearPending( [0X[3X[0X[2X ) ___________________________________________[0Xfunction
  [6XReturns:[0X  nothing.
  
  Clears a pending mail message.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailClearPending();[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-2 SCMailIsEnabled[0m
  
  [2X> SCMailIsEnabled( [0X[3X[0X[2X ) ______________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Returns [9Xtrue[0m when the mail notification system of [5Xsimpcomp[0m is enabled, [9Xfalse[0m
  otherwise. Default setting is [9Xfalse[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailIsEnabled();[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-3 SCMailIsPending[0m
  
  [2X> SCMailIsPending( [0X[3X[0X[2X ) ______________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Returns  [9Xtrue[0m  when  an  email  of the [5Xsimpcomp[0m email notification system is
  pending, [9Xfalse[0m otherwise.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailIsPending();[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-4 SCMailSend[0m
  
  [2X> SCMailSend( [0X[3Xmessage[, starttime][, forcesend][0X[2X ) __________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m  when  the  message  was sent, [9Xfalse[0m if it was not send, [9Xfail[0m
            upon an error.
  
  Tries to send an email to the address specified by [2XSCMailSetAddress[0m ([14X10.2-6[0m)
  using  the unix program [10Xmail[0m. The optional parameter [3Xstarttime[0m 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 [3Xforcewrite[0m can be used to force the sending of an
  email,  even  if  this  violates  the  minimal  email  sending interval, see
  [2XSCMailSetMinInterval[0m ([14X10.2-8[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailIsEnabled();[0X
    [4X true[0X
    [4X gap> SCMailSend("Hello, this is simpcomp.");[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-5 SCMailSendPending[0m
  
  [2X> SCMailSendPending( [0X[3X[0X[2X ) ____________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Tries  to  send  a  pending email of the [5Xsimpcomp[0m email notification system.
  Returns [9Xtrue[0m on success or if there was no mail pending.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailSendPending();[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-6 SCMailSetAddress[0m
  
  [2X> SCMailSetAddress( [0X[3Xaddress[0X[2X ) ______________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Sets the email address that should be used to send notification messages and
  enables   the   mail   notification   system   by  calling  [2XSCMailSetEnabled[0m
  ([14X10.2-7[0m)([9Xtrue[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailSetAddress("johndoe@somehost");[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-7 SCMailSetEnabled[0m
  
  [2X> SCMailSetEnabled( [0X[3Xflag[0X[2X ) _________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Enables  or disables the mail notification system of [5Xsimpcomp[0m. By default it
  is  disabled.  Returns  [9Xfail[0m  if  no  email  message was previously set with
  [2XSCMailSetAddress[0m ([14X10.2-6[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailSetAddress("johndoe@somehost"); #enables mail notification[0X
    [4X true[0X
    [4X gap> SCMailSetEnabled(false);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X10.2-8 SCMailSetMinInterval[0m
  
  [2X> SCMailSetMinInterval( [0X[3Xinterval[0X[2X ) _________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Sets  the minimal time interval in seconds that mail messages can be sent by
  [5Xsimpcomp[0m.  This  prevents  a  flooding  of  the specified email address with
  messages sent by [5Xsimpcomp[0m. Default is 3600, i.e. one hour.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCMailSetMinInterval(7200);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X10.3 Testing the functionality of [5Xsimpcomp[1X[0X
  
  [5Xsimpcomp[0m  makes  use of the [5XGAP[0m internal testing mechanisms and provides the
  user with a function to test the functionality of the package.
  
  [1X10.3-1 SCRunTest[0m
  
  [2X> SCRunTest( [0X[3X[0X[2X ) ____________________________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m upon success, [9Xfail[0m otherwise.
  
  Test    whether    the   package   [5Xsimpcomp[0m   is   functional   by   calling
  [10XReadTest("GAPROOT/pkg/simpcomp/tst/simpcomp.tst");[0m.  The  returned  value of
  GAP4stones is a measure of your system performance.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCRunTest();[0X
    [4X + test simpcomp package, version %%%VERSION%%%[0X
    [4X + GAP4stones: 69988[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
