From octave-maintainers-request at bevo dot che dot wisc dot edu Thu Apr 3 16:34:31 1997 Subject: projects and request for comments From: "John W. Eaton" To: octave-maintainers at bevo dot che dot wisc dot edu cc: jbraw at bevo dot che dot wisc dot edu Date: Thu, 3 Apr 1997 16:34:14 -0600 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