From maintainers-request at octave dot org Mon Apr 3 14:42:24 2006 Subject: Importing FIXES functions from octave-forge, and a couple of other things From: "John W. Eaton" To: David dot Bateman at motorola dot com Cc: maintainers at octave dot org Date: Mon, 3 Apr 2006 15:42:16 -0400 On 2-Apr-2006, David Bateman wrote: | The third patch adds an Fresize function. There were certain | difficulties with this. Firstly, the resize method of octave_value | didn't say whether the resize value was to be filled or not. The result | is that there are uninitialized values in the resize matrix. | I modified the resize method of octave_value and all child sub-classes | to include a boolean argument "fill". Another problem was that the | resize function of Sparse used ridx et al, rather than xridx and so | make_unique was called, when the old rep save already saved. The result | was that the rep->count on the original matrix was decremented twice and | the original matrix was deleted!!! | | Now the reason for the Fresize function was to allow | | retval = zeros (nr, nc, class (x)); | | in triu, tril, hankel.m and toeplitz functions in FIXES to be replaced with | | retval = resize (resize (x, 0), nr, nc); | | so that these functions would work correctly with user types in a | similar manner to the octave-forge functions but without the speed | memory trade-off made by the octave-forge functions. That is tril, etc | can't work with an arbitrary type as written in octave. I applied this patch. Thanks, jwe