John Gehman writes:
 > As my void * argument references a complicated structure, and not a 
 > simple array of fixed-size elements, am I forced to use the "variable 
 > size" approach to siman, where I define copy, constructor, and 
 > destructor functions instead of just saying NULL, and set the size to 0 
 > instead of sizeof(double) ?

Hello,

It's not necessary to define the additional copy/constructor
functions.

You only need to pass around a pointer to the data rather than the
data itself, in addition to the system parameters.

e.g. for 25 double parameters 'x' and an arbitrary set of data

    struct mysystem {
           double x[25];
           struct mydata * data;
        }

The size parameter should then be sizeof(struct mysystem).

-- 
best regards,

Brian Gough

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to