[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory management in .oct files
From: |
John W. Eaton |
Subject: |
Re: Memory management in .oct files |
Date: |
Tue, 22 Mar 2005 08:11:44 -0500 |
On 19-Mar-2005, Richard Hindmarsh <address@hidden> wrote:
| I guess this means that you decided not to impelemt e.g.
|
| xout1(ic1,ir1) = xin1(ir1,ic1);
|
| using a helper class.
In what way are you suggesting using a "helper class" and what do you
mean by that?
| The upside of this is speed; the downside is that statements such as
|
| double y = xin1(ir+1,ic+1);
|
| do not trip an error
Why would this cause an error?
| and statements like
|
| xout1(ir+1,ic+1) = 1;
|
| do not resize the matrix, as they do in Octave.
Doing that seemed like a bad idea at the time the Array and Matrix
classes were first implemented.
| Are there function calls e.g.
|
| double y = xout1.rhsindexing(ir+1,ic+1);
| xout1.lhsindexing(ir+1,ic+1) = 0;
|
| which have the desired behaviour?
Yes, but they don't look quite like this. I think you are looking for
the set_index, index and assign methods in the Array classes. I would
bet that you will not like the interface much, but it seemed to be
what I needed for the implementation of the scripting language way
back when, and it seems that so far, no one has contributed the code
to do it in a better way.
| Is there another route to finding this
| out other than doxygen?
Yes, reading the source without it. :-)
But seriously, someone has to write the documentation you are
seeking. Octave is mostly a volunteer project, and some of us are
busy enough writing code and apparently documentation is less fun
because there seems to be less of it.
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------