help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave segfaults on .oct file + more troubles


From: Glenn Golden
Subject: Re: Octave segfaults on .oct file + more troubles
Date: Sat, 01 Nov 2003 21:05:27 -0700

Martijn,

Martijn Brouwer writes:
> I have problems compiling and running an .oct file with the following code:
>     .
>     .
>     .
>

One way to avoid some these problems is to stay in the Octave
DLD object regime, rather than trying to cross over between Octave
and C++ library objects like complex.  At least, this approach
has worked for me so far, I'm pretty new to DLDing myself.

I'm in the midst right now of writing about a dozen small functions
similar to yours, i.e., brief, simple computations. So I put your
semantics into one of my DLDs, and added some explanatory comments
for you.  Here's how it came out. Seems to work.

I'm curious about a few things in what I've been doing too, some of
which are shown here.  Perhaps someone on the list experienced with
DLDs can comment.  For example, are there any hidden gotchas when
calling feval() from DLDs like this (aside from the obvious efficiency
issue)?  Also, is there a pre-existing way to refer to sqrt(-1)
within a DLD, without having to resort to what I did here, i.e.

        Complex j(0, 1);

I did look thru src/DLD-FUNCTIONS and the complex class definitions
for anything like this, but if it's there, I missed it.

Any other critiques/comments also appreciated.

Glenn

Attachment: lgm.cc
Description: lgm.cc


reply via email to

[Prev in Thread] Current Thread [Next in Thread]