RE: [GRASS5] Re: src/libes/gmath

[...]

The main issue in forming a common vector/matrix library is

converting

existing code to use a common format. So far I've encountered four
formats:

1. "double **a", zero-based: gmath/eigen.c, gis/eigen_tools.c,
gis/lu.c, i.pca.

2. "double **a", arbitrary ranges: r.param.scale

3. "double a[MX][MX]", one-based: gmath/jacobi.c, i.cca

4. "mat_struct *a": la.c

The main problem with using a structure is that most of the existing
code uses "a[i][j]" to access matrices.

Sorry, no idea here (hi developers!). But it should be conform...

From my days of C-programmer, I remember that pointers aritmethic(formats 1
and 2) used to be much more efficient than matrix access(even more if they
are multidimensional). But pointers are much more difficult to develop
correctly. Structures are more or less the same than matrix (more
easy-developing, less efficient-at-execution).

Is it really necesary to convert formats NOW?. I guess that everybody knows
that it's not a trivial task.

I don't have the original message so maybe I have missunderstood all this
topic.

Regards:

Gonzalo