I want to create a plugin on Gaussian elimination on matrix. The examples of gaussian elimination in C code are mostly taking in the matrix as two dimensional array. How can I write it in Slang? How to represent 2 dimensional float matrix in Slang? Are there any examples in Slang?
Thanks for help. Ang Beepeng
I have created a package called Numerics in squeakmap that adds has a Vector and Matrix class that can solve LU decompositions, linear equations, determinants, normal multiplication, kronecker multiplication and a few other things. It has test cases with examples. It is quite green still but test cases pass. Although right now I am refactoring a few things and I broke the kronecker multiplication, but I should fix it soon. I wanted to add Cholesky decomposition and eigenvalue finding to it, if you want to join in, you are more than welcome. Cheers
r
On Mon, Sep 29, 2008 at 6:43 PM, Ang Beepeng beepeng86@yahoo.com wrote:
I want to create a plugin on Gaussian elimination on matrix. The examples of gaussian elimination in C code are mostly taking in the matrix as two dimensional array. How can I write it in Slang? How to represent 2 dimensional float matrix in Slang? Are there any examples in Slang?
Thanks for help. Ang Beepeng -- View this message in context: http://www.nabble.com/representing-matrix-as-two-dimensional-array-in-Slang-... Sent from the Squeak - Dev mailing list archive at Nabble.com.
2008/9/29 Ang Beepeng beepeng86@yahoo.com:
I want to create a plugin on Gaussian elimination on matrix. The examples of gaussian elimination in C code are mostly taking in the matrix as two dimensional array. How can I write it in Slang? How to represent 2 dimensional float matrix in Slang? Are there any examples in Slang?
Hardware does not supports 2 dimensional arrays :) Therefore, when you write something like: z := array [x,y] , compiler decomposing this code to following:
z:= singleDimentionArrayPointer[x*numCols + y]
in same way, in slang you can use a linear buffer of floats, and write access routine which taking two indexes, but then translating them to single index in your buffer, and voila - you have a two-dimentional matrices :)
Thanks for help. Ang Beepeng -- View this message in context: http://www.nabble.com/representing-matrix-as-two-dimensional-array-in-Slang-... Sent from the Squeak - Dev mailing list archive at Nabble.com.
squeak-dev@lists.squeakfoundation.org