[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Basic questions regarding liboctave and dynamic function developmen
From: |
Etienne Grossmann |
Subject: |
Re: Basic questions regarding liboctave and dynamic function development |
Date: |
Wed, 31 Jan 2001 08:28:25 +0000 |
Hello,
From: Joshua Rigler <address@hidden>
# Keeping in mind that I am fairly fluent in C, but know virtually nothing
# about object oriented programming or C++, please forgive my ignorance...
# 1) What exactly is liboctave (for what, and how is it used)? How do I
# interpret the documentation for liboctave found in liboctave.ps? (part
# of the Octave distribution docs)
# 2) Is liboctave.ps supposed to describe all functions that should be
# available to me when I write .oct functions? (It doesn't...for example I
# have no idea what the function "matrix_value" does (found in lu.cc), the
# docs for liboctave say nothing about it, and I see no explanation in the
# header file or source code).
I am no octave or C++ expert, but, in src/DLD-FUNCTIONS/lu.cc, there
is
octave_value arg = args(0); // Put argument to lu in a
// variable. At this point, you
// don't know what the arg is.
... // Check that a square matrix has
// been passed
Matrix m = arg.matrix_value (); // Make a matrix out of it. (a
// variable of class Matrix). You
// can then use Matrix methods on m.
When implementing c++ functions for octave, I never got beyond
"looking at how other functions are done and copying". Also asking on
this list when you have a specific problem may help.
# 3) Any suggestions for how somebody who understands C, but has no
# object-oriented programming experience, and only a basic understanding
# of C++ syntax can figure out how to write some .oct functions to make
# calls to a C library? Is there a trick to including a C header file in
# a C++ program?
Sorry, I never touched .oct functions
# I won't go so far as to ask for a basics of C++ lesson, but if anyone
# could help me get just a rudimentary understanding of how things work in
# Octave, I should be able to put together a nice CDF I/O package for
# Octave fairly quickly.
Hth a little bit,
Etienne
-------------------------------------------------------------
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
-------------------------------------------------------------