igraph-help
[Top][All Lists]
Advanced

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

[igraph] ?????? ?????? bipartite from edge list?


From: ????????????
Subject: [igraph] ?????? ?????? bipartite from edge list?
Date: Fri, 2 Aug 2013 22:13:55 +0800


oh, i found the way of adding edges by node id, it's graph[id1,id2]<-1, so i can add the two types of nodes in advance and then add the edges according to the edgelist, that's great~

BYW, about the value of "type" of the nodes for bipartiting, it tested by adding a new node with another type value "t". as a result, although bipartite.mapping still returned TRUE, but the values of type became confusing. some nodes of "s" type is TRUE, some other nodes of "s" type is FALSE. so i think for bipartiting, let type be TRUE or FALSE is better.

Gang

------------------ ???????? ------------------
??????: "G??bor Cs??r"<address@hidden>;
????????: 2013??8??2??(??????) ????9:23
??????: "Help for igraph users"<address@hidden>;
????: Re: [igraph]?????? bipartite from edgelist?

On Thu, Aug 1, 2013 at 11:26 PM, ???????????? <address@hidden> wrote:

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.

It would be nice to have some complete example (=code), to see what exactly you did. read.graph() can read various formats, and sometimes vertex names are created, sometimes not. I guess you used format="edgelist", so no vertex names were added.

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?

You can add edges based on numeric vertex ids as well. The type of the vertex has not much to do with the name of the vertex, so I still don't get the problem.

Gabor

[...]

reply via email to

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