igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Getting started in igraph in C


From: Prithwiraj MUKHERJEE
Subject: Re: [igraph] Getting started in igraph in C
Date: Sat, 5 Mar 2011 16:57:56 +0100

Hi Gabor

Tanks for the reply. Personally I prefer working in R (as I use libraries apart from igraph also), so what you suggest seems ideal to me.

I am familiar with coding in both languages, but know nothing about how they interact with the hardware, so pardon me if this question sounds silly. If I call bits of C code through R, do you mean those bits will will execute at the pace of a C program, i.e. faster?

Best Regards
Prithwiraj

On Sat, Mar 5, 2011 at 4:39 PM, Gábor Csárdi <address@hidden> wrote:
Hi Prithwiraj,

there is no straightforward way to convert R code into C AFAIK. R is a
much higher level language, with language constructs that are not easy
to express in C, so this is not a trivial thing.

I suggest that you identify the bottlenecks in your code, and then
rewrite only these in C, and keep the rest in R.
See the 'Writing R extensions' manual on the R homepage on how to call
C code from R.

Best,
Gabor

On Sat, Mar 5, 2011 at 10:00 AM, Prithwiraj MUKHERJEE
<address@hidden> wrote:
> Hello all
>
> I have been using igraph in R for a while now and have gotten used to it.
> However, for speed considerations I may reluctantly go back to using C.
>
> I have written a large amount of code in R already and would like to port it
> into C as painlessly as possible.
> I was wondering if there is a script or at least a general heuristic for
> converting R code to its C equivalent. I am sure there is some method to the
> naming conventions of igraph functions and their arguments.
>
> Best Regards
> Prithwiraj
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



--
Gabor Csardi <address@hidden>     UNIL DGM


reply via email to

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