13 Sep 13:03
Returning a pike array from C
From: Felip Alàez Nadal <uu.nix.uu <at> gmail.com>
Subject: Returning a pike array from C
Newsgroups: gmane.comp.lang.pike.user
Date: 2008-09-13 11:04:27 GMT
Subject: Returning a pike array from C
Newsgroups: gmane.comp.lang.pike.user
Date: 2008-09-13 11:04:27 GMT
Hello:
I'm working on implementing the inverse of a matrix and the resolution of linear equations systems into the main pike distribution. Actually, I've finished implementing the LU decomposition of a matrix, which is a preliminar step towards that, as a method for the Math.Matrix class. I've been writing new code at src/modules/Math/matrix_code.h and I've a problem, because the lu method has to return a pike array with 4 elements: 3 Math.Matrix objects which I've created inside the method and an int. Could someone explain me how to create a pike array from the C API and return It? Also, which is the signature which I must declare for pike understanding the method?
I have some other doubts about the C API, but at the moment this is the most important.
Thanks you.
--
Felip Alàez Nadal
I'm working on implementing the inverse of a matrix and the resolution of linear equations systems into the main pike distribution. Actually, I've finished implementing the LU decomposition of a matrix, which is a preliminar step towards that, as a method for the Math.Matrix class. I've been writing new code at src/modules/Math/matrix_code.h and I've a problem, because the lu method has to return a pike array with 4 elements: 3 Math.Matrix objects which I've created inside the method and an int. Could someone explain me how to create a pike array from the C API and return It? Also, which is the signature which I must declare for pike understanding the method?
I have some other doubts about the C API, but at the moment this is the most important.
Thanks you.
--
Felip Alàez Nadal
RSS Feed