Felip Alàez Nadal | 24 Aug 14:03

Re: where is Math.Matrix->`/ ?



2008/8/24 Mirar <at> Pike importmöte för mailinglistan <6341 <at> lyskom.lysator.liu.se>
It does? I'm not sure when you want to use it.

It should be easy to do with an intermediate object that remembers the
first indexing.

When implementing matrix methods, It should be faster to access directly to the underlying C array than casting to an pike array when you want to access to some element at the array. As an example, when you want to implement least squares, or to do some computations with scattering matrices, you need to access lots of times to the elements at the matrix to do lots of computations. You can have an immutable matrix object like Pike has, and It makes easier to do the already implemented operations on matrices, but It's harder to and inneficient to create new matrix objects everytime you need to do something.

That's why I need indexing. I thing using intermediate objects is too much slow. Think about a 5000x5000 matrix being accessed milions of times. That's too much overhead.

I'll send you any patch I develop. Bye!


--
Felip Alàez Nadal

Gmane