SliToMathematicaIndex - Convert SLI indices to Mathematica-like indice
sliIndex MathematicaToSliIndex -> mathematicaIndex
3 SliToMathematicaIndex -> 4
[ 3 1 ] SliToMathematicaIndex -> [ 4 2 ]
"SliToMathematicaIndex" converts SLI indices to Mathematica-like
indices.
For an array of size N, valid SLI indices are in the range 0..N-1 while
valid Matematica indices are in the range -N..-1, 1..N (negative
indices indicating backward indexing from the end of the array).
Note that this routine will always return positive indices.
Note the difference in the argument list compared to
"MathematicaToSliIndex". Only one argument, the index(array)
itself, is needed.
The implementation is _most_ simple (add 1 to the index), but the
Routine is supplied for symmetry reasons.
Note that this routine will always return positive indices. Hence,
the sequence
[array] MathematicaToSliIndex SliToMathematicaIndex
is NOT identity.
Ruediger Kupper
11.3.2003
/var/www/debian/nest/nest-simulator-2.20.0/lib/sli/mathematica.sli