[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
An engine for octave
From: |
mxu1 |
Subject: |
An engine for octave |
Date: |
Wed, 31 Mar 1999 20:42:28 +0000 |
Hi,
I am considering an engine for octave which may open an instance of octave, do
any number of fevals, and exchange of data between the calling C/C++ program
and the octave instance, and surely close the instance when done.
a) data exchange between octave and C/C++
a.1) From octave to C/C++:
for example, to retrieve an octave variable "a":
assume symtab is the object curr_sym_tab of the opened octave instance, then
// some segments
symbol_record *record = symtab.lookup("a");
octave_value octval = record.variable_value();
return octval.scalar_value(); // in appropriate form
a.2) From C/C++ to octave
for example, to put a Matrix "m" to octave as variable "a":
// some segments
octave_value octval = octave_value(m);
symbol_record *record = symtab.lookup("a", 1);
record.define(octval);
b) open/close an octave instance
Just like the code in octave.cc in the source code of octave
c) fevals are stated in John W. Eaton's post on 3/30
Remaining issues:
e) The octave has global_sym_tab, top_level_sym_tab, and curr_sym_tab. What is
the difference between them?
f) The above procedure may work for a standalone C/C++ program. But if I want
to call octave interpreter from another interactive process like perl or
python,
will anything be different from the standalone C/C++ program?
I checked the help-octave archive. It seems that the interest of embedding
octave in another environment is always high. Has anyone done anything in that?
If not, I will code one.
--
Min Xu
City College of NY, CUNY
Email: address@hidden
address@hidden
Tel: (O) (212) 650-6865
(O) (212) 650-5046
(H) (212) 690-2119
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- An engine for octave,
mxu1 <=