[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Importing FIXES functions from octave-forge, and a couple of other thing
From: |
John W. Eaton |
Subject: |
Importing FIXES functions from octave-forge, and a couple of other things |
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<T> 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
- Importing FIXES functions from octave-forge, and a couple of other things, David Bateman, 2006/04/02
- Re: Importing FIXES functions from octave-forge, and a couple of other things, Paul Kienzle, 2006/04/02
- Importing FIXES functions from octave-forge, and a couple of other things, John W. Eaton, 2006/04/03
- Importing FIXES functions from octave-forge, and a couple of other things, John W. Eaton, 2006/04/03
- Importing FIXES functions from octave-forge, and a couple of other things, John W. Eaton, 2006/04/03
- Importing FIXES functions from octave-forge, and a couple of other things, John W. Eaton, 2006/04/03
- Importing FIXES functions from octave-forge, and a couple of other things,
John W. Eaton <=