octave-maintainers
[Top][All Lists]
Advanced

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

Re: Avoid global pointers in dae


From: Carlo De Falco
Subject: Re: Avoid global pointers in dae
Date: Mon, 15 Aug 2016 16:36:34 +0000

On 15 Aug 2016, at 12:42, Francesco Faccio <address@hidden> wrote:

> What I wanted to do to avoid global pointers was to overload the constructor 
> of DAEFunc in order to call 
> 
> ColumnVector res = (*pointres) (y0, yp0, t, ires, ida_fcn);  
> 
> where ida_fcn is a octave_function *, but octave_function is an incomplete 
> type inside liboctave.
> The same problem affects the Jacobian evaluation.

Is there any special reason why you insist setting user_data to a function 
pointer to user function
instead of using the 'this' pointer of your IDA object?

That would look much more simple and natural to me because then you can 
implement anything you need
as a method in your class and you can also directly access all data stored in 
instances of that class ...

c.





reply via email to

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