igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] bipartite from edgelist?


From: ????????????
Subject: Re: [igraph] bipartite from edgelist?
Date: Fri, 2 Aug 2013 06:16:08 +0800


Thanks Tamas,

yes, as you said, igraph would not know which nodes are buyers and sellers, though the two columns of the edgelist are buyer id and seller id.

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.

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.

Gang

------------------ Original ------------------
From:  "Tam??s Nepusz"<address@hidden>;
Date:  Fri, Aug 2, 2013 06:05 AM
To:  "Help for igraph users"<address@hidden>;
Subject:  Re: [igraph] bipartite from edgelist?

> i have some order records including buyer ids and seller ids, we can consider it as an edgelist, in which the buyers and sellers are the nodes.
>
> i want to consider it as an bipartite network including buyers and sellers, but how can i bipartite it into buyers network and sellers network, please?
>
> if i call bipartitie.mapping, it returns False...
Please give us more details about how you constructed your network. Chances are that the problem lies in the fact that igraph does not "know" which of the nodes are buyers and which ones are sellers. You have to supply this as a binary vertex attribute named "type" which is TRUE for buyers and FALSE for sellers (or the other way round).

--
T.
_______________________________________________
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]