On 5 November 2015 at 10:17, Gábor Csárdi <[email protected]> wrote: > > so that you don't need to copy between C and R. >
Oh, so does the R interface avoid copying data structures that are also exposed to R? (I don't know anything about R internals or how to extend R with C.) In which situations does it manage to avoid copies? I am interested in this because a major bottleneck of the Mathematica interface is all the copying it needs to do and currently I'm trying to speed things up. When igraph functions return an igraph_vector_t, does it need to be copied to get exposed as an R numerical vector? If not, did you need to make changes to igraph's memory allocation to make it usable in conjunction with R? I know that copies can be avoided when sending data *to* igraph, e.g. often we can use igraph_vector_view() Does igraph offer anything similar to a "vector view" for an igraph_t? I.e. if I already have an igraph_vector_t for the "from" vertices and "to" vertices, can I safely re-use them inside of a graph? I never really looked at the internal structure and I don't know what oi, ii, os, is do ... If igraph wasn't designed for this, it's probably not a good idea for me to push it though. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
