[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
John W. Eaton
Sat, 23 Oct 1999 13:20:10 -0500 (CDT)
On 23-Oct-1999, etienne grossmann <address@hidden> wrote:
| Since yesterday, I have written a "src/DLD-FUNCTIONS/kron.cc" that
| implements the Kronecker product for real and complex matrices.
| I also wrote two test scripts "test/octave.test/linalg/kron-1.m" and
| "test/octave.test/linalg/kron-2.m" and modified src/Makefile.in and
| test/octave.test/linalg/linalg.exp, the later so that "make check"
| checks the new function too.
| May I send a patch? To octave-source?
BTW, a better way to implement this might be to put the code for the
real and complex versions of kron in liboctave, then make your DLD
function a simple wrapper. That way, the code would be useful from
other C++ code, not just from the Octave interpreter. In other words,
people who already have Matrix objects would not have to do stuff like
this to use the new code:
tmp_args(1) = b_mat;
tmp_args(0) = a_mat;
octave_value_list kron_result = feval ("kron", tmp_args);
Matrix result = kron_result(0);
Instead, they could just use
Matrix result = kron (a_mat, b_mat);
Wouldn't that be better?
| ps : Silly question : how does one do a nice patch when not only are
| files modified, but also created?