Array indexing issues

Coordinator
Mar 21, 2011 at 9:03 AM

etendren has raised the following issue:

"One problem.
In matlab this function is oriented to indexing from 1 but no from 0. When in ILNumerics - from 0..
Now I commited it with indexing from 1, folloing matlab discription. But I thing it is not appropriate if we globally use arrays indexed from 0."

I agree and think that attempting to emulate the 1-based indexing of matlab when the underlying arrays in the language (C#) are all 0-based will cause problems and that therefore we should always assume zero-based indexing.

Any thoughts?

Mar 24, 2011 at 4:16 AM

I agree, it should be zero-based indexing, most if not all programmers using this library will assume that the containers are zero-indexed from experience, and I don't think we should be ones to change that presumption.