### Singularities and test functions

To detect singularities on the curve one must set the option Singularities on. Singularities are defined using the singularity matrix, as described in section 2.4.3. The continuer stores the handles to the singularities, the testfunctions and the processing of the singularities respectively in the variables `cds.curve_singmat`,`cds.curve_testf` and `cds.curve_process`.

A call to `[S,L] = feval(cds.curve_singmat)` gets the singularity matrix and a vector of 2-character strings which are abbreviations of the singularities.

A call to `feval(cds.curve_testf, ids, x, v)` then must return the evaluation of all testfunctions, whose indices are in the integer vector `ids`, at `x` (`v` is the tangent vector at `x`). As a second return argument it should return an array of all testfunction id's which could not be evaluated. If this array is not empty the stepsize will be decreased.

When a singularity is found, a call to `[failed,s] = feval(cds.curve_process,i,x,v,s)` will be made to process singularity `i` at `x`. This is the point where computations can be done, like computing normal forms, eigenvalues, etc. of the singularity. These results can then be saved in the structure `s.data` which can be reused for further analysis. Note that the first and last point of the curve are also treated as singular.