Name: SliToMathematicaIndex - Convert SLI indices to Mathematica-like indice

Synopsis:

sliIndex MathematicaToSliIndex -&gt; mathematicaIndex


Examples:

3     SliToMathematicaIndex -&gt; 4 
[ 3 1 ] SliToMathematicaIndex -&gt; [ 4 2 ]


Description:

"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.


Remarks:

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.


Author:

Ruediger Kupper


FirstVersion:

11.3.2003


SeeAlso:

MathematicaToSliIndex

Source:

/var/www/debian/nest/nest-simulator-2.20.0/lib/sli/mathematica.sli
