arraylib::EdgeClip - Clip 2-d array indices at array edge
[2d-indices] height width EdgeClip -> [clipped-2d-indices]
This function iterates through the given array indices and checks if
they lie inside the specified range [0,height) and [0,width),
respectively.
Indices are modified according to the following rules:
1. If both indices lie inside [0,height) and [0,width), respectively,
they are left untouched.
2. If the row index lies below 0, this index is replaced by 0.
3. If the row index lies above "height", this index is replaced by "height".
4. If the column index lies below 0, this index is replaced by 0.
5. If the column index lies above "width", this index is replaced by "width".
Thus, the indices are effectively hard clipped to the array bounds;
that is, to the range [0,height), [0,width) respectively.
Note that by NEST convention, for index pairs, the first index denotes
the row, and the second index denotes the column.
Dimensions of the index array are preserved.
The index array is expected to be a (nested) array of integer values
only. Code will break otherwise.
The index array is expected to be a (nested) array of integer values only.
"Namespace"-dictionary "arraylib".
Ruediger Kupper
17.3.2003
/var/www/debian/nest/nest-simulator-2.20.0/lib/sli/arraylib.sli