If your data is in a C array of doubles, you can
use it directly in s7 (i.e. without copying anything);
use the s7 function s7_make_float_vector_wrapper.
There's a similar function to wrap GSL complex
vectors which are (from C's point of view) arrays
of doubles with real/imaginary parts interleaved.
It would be easy to add integer vector wrappers.
Both allocation and free of the actual vector is
left to C.

In the other direction, you can access the s7 float-vector
(or int/complex) directly in C via s7_float_vector_elements
and its friends.  In this case allocation and free are
left to s7.


_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to