James K. Lowden wrote:
> A colleague has some Matlab code we'd like to explore porting to Octave.
> The code in question makes use of Matlabs '@' directories and operator
> overloading. We don't mind using C++ instead. The harder it is, the
> longer it will take, that's all. Could someone tell us what would be
> involved?
>
The "@" directory classes as in the Octave repository but have had
limited testing. The inferiorto and superiorto functions are also not
written yet. So I therefore see that there are two means you might go to
get this going are
1) Use the bleeding edge Octave (IE a build from the repository itself)
and use the "@" directories as is.. You'll very likely run into bugs,
but in a sense that is a good thing as known bugs can be fixed, and in
the long run that is good for everyone.
2) Write your type in C++ and do the overloading there.. There are
several examples of user types in octave-forge that can give you a guide
of how to go about that, and in particular
* The Galois field type in the comms package
* The fixed point types in the fixed package
* The symbolic type in the symbolic package
however the easiest to start with is the extra/triangular package as it
was written with the idea of showing users how to write such types.. I
include the short documentation file from this package here.
> We have worked through http://octave.sourceforge.net/coda/. It was very
> helpful, but of course it doesn't take us quite where we want to go.
> (Less helpful was
> http://www.gnu.org/software/octave/doc/interpreter/User_002ddefined-Data-Types.html#User_002ddefined-Data-Types,
> except in the negative sense.)
>
You might also want to check
http://www.gnu.org/software/octave/doc/interpreter/Dynamically-Linked-Functions.html
for information on accessing Octave's internals from C++
Regards
David
--
David Bateman [EMAIL PROTECTED]
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev