igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to initialize a graph from a (C++) vector of vectors or


From: Gábor Csárdi
Subject: Re: [igraph] How to initialize a graph from a (C++) vector of vectors or from a vector of links
Date: Thu, 27 Feb 2014 18:05:04 -0500

There is no easy way, AFAIK. We could have a matrix view, that handles a chunk of memory as a dense matrix, and if the vector of vectors in C++ is a continuous chunk of memory, then there was an easy way.

But right now, just go over the matrix, put the non-zero edges in an igraph_vector_t and call igraph_create().

Gabor


On Thu, Feb 27, 2014 at 5:14 PM, Przemyslaw Grabowicz <address@hidden> wrote:
Dear all,

I know that igraph is written in C. However, what is the easiest way of creating an igraph graph from an adjacency matrix declared as a vector of vectors or from a list of links declared as a vector in C++?

Thanks,
Przemyslaw Grabowicz.


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

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