Re: Matrix Operations

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

Does Euphoria need a set of matrix operations? That is, operations that use a matrix construct.

And if so, should they be built-in or can they be in a library?

By matrix I'm referring to a two-dimensional array of data, one that has 0 or more rows or elements and each row is the same size. It could be represented as a sequence containing sub-sequences all of the same length. eg.

sequence mat 
 
mat =  
 { 
  {1,2,3}, 
  {4,5,6}, 
  {7,8,9} 
 } 

There are already a couple libraries about matrices in the archive. However, their biggest drawback is their poor scalability.

As long as one considers only matrices of very small size, say < 8, they already work in a reasonable time, and the results are not too wrong, except for inversion, as the LU algorithm they all use is terribly unstable numerically. None attempts diagonalisation or singular value decomposition.

For larger matrices, they usually fail in a pathetic, lengthy way., because of runaway roundoff errors.

If we only want to do low dimension linear programming, then I'd say just add one of the existing matrix libraries to the std lib.

If we want to do heavier stuff, like OLS rgression, graph handling, precise rational approximation or such, then I'd say use builtin routines instead. There are many free C/Fortran libs around to grab code from.

Unmess it is considered that an Euphroia user should never engage in mathematics, and he just needs to use another language for that purpose.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu