for an edgelist file, we can use read.graph(in R) to load the graph, it seems
fast, and the node id in edgelist file will be used as real node id.
however, if i add the vertices by reading the edgelist file myself, the node
ids in the file will be only used as the names of the vertices.
if i add the two types of vertices in advance, how can i add the edges between
them according to the edgelist file? it seems that add.edges can only add edges
by names of the node?
Gang
------------------ ???????? ------------------
??????: "G??bor Cs??r"<[email protected]>;
????????: 2013??8??2??(??????) ????7:39
??????: "Help for igraph users"<[email protected]>;
????: Re: [igraph] bipartite from edgelist?
On Thu, Aug 1, 2013 at 6:16 PM, ???????????? <[email protected]> wrote:[...]
i'm going to do as follow: as reading edgelist line by line, i add the
vertices and edges by myself. during that process, i can add an attribute named
"type", which is "b" for buyers, and "s" for sellers.
i have tested by small graph, it works.
That is a little surprising, because the 'type' attribute should be logical,
i.e. TRUE or FALSE.
but it will be more slow i think, because i have to judge where a vertex or
edge has existed, and the buyer id and seller id can't be considered as the
vertex id, but as the name of the vertex.
To be honest, I don't really get it why it will be slow. Just create a network
and assign a type attribute for all vertices at the same time, in the beginning.
Gabor
[...]
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help