Re: [graph-tool] graph-tool Digest, Vol 100, Issue 10
Thanks for the answer Tiago! Have a great week! ____ *Rogelio Basurto Flores* Laboratorio de Sistemas Complejos *Unidad Profesional Interdisciplinaria en Ingeniería y * *Tecnologías Avanzadas,* *Instituto Politécnico Nacional,* *Av. IPN # 2580, Col. Laguna Ticoman,* *Mexico D. F., 07340, Mexico* *Mobile Phone: 33 1551 3665* *E-Mail: rogelio.basurto@gmail.com <rogelio.basurto@gmail.com>* On Sun, May 29, 2016 at 5:00 AM, <graph-tool-request@skewed.de> wrote:
Send graph-tool mailing list submissions to graph-tool@skewed.de
To subscribe or unsubscribe via the World Wide Web, visit https://lists.skewed.de/mailman/listinfo/graph-tool or, via email, send a message with subject or body 'help' to graph-tool-request@skewed.de
You can reach the person managing the list at graph-tool-owner@skewed.de
When replying, please edit your Subject line so it is more specific than "Re: Contents of graph-tool digest..."
Today's Topics:
1. Re: About the blocks from the minimize_nested_blockmodel_dl (Tiago de Paula Peixoto) 2. Graph-tool configure error: Boost::Iostreams library is available but no usable boost::iostreams is found (Bretsky) 3. Re: Graph-tool configure error: Boost::Iostreams library is available but no usable boost::iostreams is found (Frank Takes)
----------------------------------------------------------------------
Message: 1 Date: Sat, 28 May 2016 13:49:35 +0200 From: Tiago de Paula Peixoto <tiago@skewed.de> To: Main discussion list for the graph-tool project <graph-tool@skewed.de> Subject: Re: [graph-tool] About the blocks from the minimize_nested_blockmodel_dl Message-ID: <8d4b53ee-e259-e49b-755a-0f70abace2ea@skewed.de> Content-Type: text/plain; charset="utf-8"
On 26.05.2016 04:22, Rogelio Basurto wrote:
I am reading a bipartite network from a graphml file, then I do some filtering and finally I construct the minimize_nested_blockmodel_dl as in the example. Then I draw it, just like in the example, and it looks great. I manage to draw it with the node names and they are fine.
Then, I would like to check the names of the nodes in the different blocks, by the levels they are arranged from the stochastic nested block model. But I do not know how to do that.
I found the function get_bstack() for the NestedBlockState object, but the index in those vertices are from 0 to N, where N is the number of vertices per level (of the model, not from my graph, I think), then how do I associate my original vertex index (which has its name) to those graphs from the different levels?
The partition of nodes in the first level is obtained via:
b = state.levels[0].get_blocks()
This is a vertex property map that says to which block a node of your network belongs. For example:
print(b[10]) 3
The above means that vertex 10 belongs to group 3. The same can be done for the higher levels of the hierarchy, i.e.
b = state.levels[1].get_blocks() print(b[3]) 5
The group number 3 in the first level, belongs to group number 5 in the second level. An so on.
Best, Tiago
-- Tiago de Paula Peixoto <tiago@skewed.de>
participants (1)
-
Rogelio Basurto