help-octave
[Top][All Lists]
Advanced

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

Re: overloading variables in octave function calls


From: Jordi Gutiérrez Hermoso
Subject: Re: overloading variables in octave function calls
Date: Thu, 29 Jul 2010 10:29:01 -0500

On 28 July 2010 12:11, Rishi Amrit <address@hidden> wrote:

> I am trying to do automatic differentiation of functions using a
> COIN package called ADOL-C. Its a C package so I wrote a wrapper CC
> file. Now ADOLC is written to differentiate C/C++ programs by
> overloading all the double/float variables with a new type called
> active type - adouble.

I don't understand. In C++, functions are overloaded, not variables.
Do you mean it overloads functions with a different data type?

> Now suppose I want to pass an octave function. So that octave
> function is evaluated using feval in the CC file and the data type
> it takes in is a columnvector. Is it possible to overload
> columnvector with adouble ?

I think that what you need to do is write a wrapper function that has
the function signature that your code expects and have that wrapper
function call the Octave function... but depending on what an adouble
is and if it can be cast to types that Octave understands, this may or
may not be feasible.

HTH,
- Jordi G. H.


reply via email to

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