To get a basic idea how each file is structured, there are prepared empty template
files in the folder ocdoc.
LIME is divided into packages. Each package has its distinct functionality. Al-
though, for some functions it might be arguable where they should be placed. If
new functions are of common special functionality are designed, then a new package
(folder) is recommended to be created. Remember, that the OcDoc documentation
tool creates an .html documentation for each file in a given folder.
Functions have a simple naming convention – the name is composed using lower
case abbreviations to describe its functionality. No upper case, no dashes, no hyphens
are used. The first part of a function name usually consists of the name of the package
the function comes from – ilsgeenc
(comes from the package ils
from the package imat
). Then the rest of the function name is composed of function-
ality specification (e.g., norm
for a function computing a norm, hull
for a function
computing the hull) – imatnorm
. Also the specification of implementation
of a function is usually added – ilsjacobienc
We remind again, that in order to make the automatic documentation work, the
structure of the file must be kept.
Here we add some more recommendations:
- Methods do not always succeed. To indicate the state of the result we use the
output variable state. We use short (mostly three-letter) string flags. The
most common flags are ’vec’ - a finite vector or scalar is returned, ’sin’ -
possible singularity occurred, ’zer’ – zero division occurred or pivot contains
zero, ’inf’ - infinite result returned, ’exc’ - maximum number of iterations
exceeded, ’emp’ - empty solution returned, 'unk' - unknown result. For flags that can be returned by
a given method see its .m file or documentation.
- Methods do not always return verified results. We use the output variable ver
to indicate verified result. The value 1 means verification, the value 0 means the
- To indicate that a variable is an interval variable we use the prefix i. Hence ix
(iA) is an interval vector (matrix).
- Most of the interval methods work only for interval input, when they are to be
used for a real input, it must be intervalized first. It is a responsibility of a user
to properly handle that (simply calling the Octave Interval function infsupdec
on a real input might not be sufficient).
- If a method is implemented that has similar functionality to some existing
method, first see its input and return parameters to make it consistent for other
methods that can possibly use this method too.
Here is an example of a function definition satisfying the above recommendations:
[ix, state, it] = ilskrawczykenc(iA, ib, e, maxit, ioldx)