From octave-maintainers-request@bevo.che.wisc.edu Thu Apr 3 16:29:50 1997
Received: (from daemon@localhost) by bevo.che.wisc.edu (8.6.12/8.6.12) id QAA00819 for octave-maintainers-outgoing; Thu, 3 Apr 1997 16:29:50 -0600
Received: from tillamook-sharp.eaton.net (jwe@stlouis-113.net66.com [206.139.80.113]) by bevo.che.wisc.edu (8.6.12/8.6.12) with ESMTP id QAA07783; Thu, 3 Apr 1997 16:29:48 -0600
Received: (from jwe@localhost) by tillamook-sharp.eaton.net (8.7.6/8.6.12) id QAA26531; Thu, 3 Apr 1997 16:29:33 -0600
Date: Thu, 3 Apr 1997 16:29:33 -0600
Message-Id: <199704032229.QAA26531@tillamook-sharp.eaton.net>
From: "John W. Eaton"
To: octave-maintainers@bevo.che.wisc.edu
cc: jbraw@bevo.che.wisc.edu
Subject: status
X-Mailer: GNU Emacs 19.34.1 + VM 6.22 (i586-pc-linux-gnu)
Sender: octave-maintainers-request@bevo.che.wisc.edu
Since releasing 2.0.5, I've been working on some small projects and
thinking about how to clean up Octave's internals a bit, so that it
will be easier to work with later, particularly if anyone ever tries
to implement an Octave to C++ translator (I would like to, but it is a
big project and some people may be more interested in seeing better
graphics or GUI tools first).
In any case, here are some of the things that are already done:
* Commas in global statements are no longer special. They are now
treated as command separators. This removes a conflict in the
grammar and is consistent with the way Matlab behaves. The
variable `warn_comma_in_global_decl' has been eliminated.
* It is now possible to declare static variables that retain their
values across function calls. For example,
function ncall = f () static n = 0; ncall = ++n; endfunction
defines a function that returns the number of times that it has
been called.
* Functions like quad, fsolve, and lsode can take either a function
name or a simple function body as a string. For example,
quad ("sqrt (x)", 0, 1)
is equivalent to
function y = f (x) y = sqrt (x); endfunction
quad ("f", 0, 1)
* If the argument to eig() is symmetric, Octave uses the specialized
Lapack subroutine for symmetric matrices for a significant
increase in performance.
* Octave now has a logical data type that should be mostly
compatible with the logical data type that Matlab 5 apparently
has. A true value is represented by 1, and false value by 0.
Comparison operations like <, <=, ==, >, >=, and != now return
logical values. Indexing operations that use zero-one style
indexing must now use logical values. You can use the new
function logical() to convert a numeric value to a logical value.
This avoids the need for the built-in variable
`prefer_zero_one_indexing', so it has been removed. Logical
values are automatically converted to numeric values where
appropriate.
* If the argument to lsode that names the user-supplied function is
a 2-element string array, the second element is taken as the name
of the Jacobian function. The named function should have the
following form:
JAC = f (X, T)
where JAC is the Jacobian matrix of partial derivatives of the
right-hand-side functions that define the set of differential
equations with respect to the state vector X. (Similar changes
need to be made for other functions that require user-supplied
functions).
I plan to start making snapshots again fairly soon so that people can
start using and testing some of these new features.
My next message will contain some more information about some of the
things I'm thinking about working on. I'd appreciate any comments or
suggestions people might have.
Thanks,
jwe
From octave-maintainers-request@bevo.che.wisc.edu Thu Apr 3 16:34:31 1997
Received: (from daemon@localhost) by bevo.che.wisc.edu (8.6.12/8.6.12) id QAA24369 for octave-maintainers-outgoing; Thu, 3 Apr 1997 16:34:31 -0600
Received: from tillamook-sharp.eaton.net (jwe@stlouis-113.net66.com [206.139.80.113]) by bevo.che.wisc.edu (8.6.12/8.6.12) with ESMTP id QAA16247; Thu, 3 Apr 1997 16:34:29 -0600
Received: (from jwe@localhost) by tillamook-sharp.eaton.net (8.7.6/8.6.12) id QAA26545; Thu, 3 Apr 1997 16:34:14 -0600
Date: Thu, 3 Apr 1997 16:34:14 -0600
Message-Id: <199704032234.QAA26545@tillamook-sharp.eaton.net>
From: "John W. Eaton"
To: octave-maintainers@bevo.che.wisc.edu
cc: jbraw@bevo.che.wisc.edu
Subject: projects and request for comments
X-Mailer: GNU Emacs 19.34.1 + VM 6.22 (i586-pc-linux-gnu)
Sender: octave-maintainers-request@bevo.che.wisc.edu
I'm currently thinking about how to implement the array and matrix
operations more consistently. For example, it should be possible to
write something like
A = hilb (3);
B = A(1:2:3, 1:2:3)++;
in Octave or in C++ using liboctave, though in C++ we have to use a
different method for creating the range variables -- operator
overloading only works up to a point. There is no way to implement
Octave's colon operator or `.*' or even `**' using operators in C++,
and even when the operators are available, they don't always have the
same precedence in Octave and C++, so it is probably best to avoid
confusion by simply not using them.
So, I'm thinking that the liboctave classes should define a set of
consistently named functions corresponding to all Octave operators,
and then provide operators only in a few cases where it really makes
sense -- probably just for negation (unary -), addition (+),
subtraction (-), matrix multiplication (+), and division of a matrix
by a scalar (/).
Currently there are a number of things that are not implemented in
liboctave, so they are not available in C++. I plan to try to push as
much functionality to the liboctave level so that it will become
easier to write more powerful .oct files and to convert Octave code to
C++.
Comments or suggestions?
Thanks,
jwe