Hi Rogelio I'm just another user of graph tool, and I'm not familiar with the function that you've mentioned, but I can tell you how I do my naming.
I create a vertex property map for my vertices and add a string value to each vertex which is going to be their name (the vertex number as integer transformed into a string). Now if I remove a vertex, or something changes, the property map will stay with the vertices and I can call them. If the function you are talking about will generate a new graph, I don't know how to solve that, but if you make your graph to be simplified to that graph, you will have the names. I'm sure there is an easier way, but I will leave that to the experts :) Good luck Csongor On Wed, May 25, 2016 at 11:52 PM, Rogelio Basurto <[email protected] > wrote: > Hello, > > I've been using graph tool for about 3 weeks now. I just ran into it while > searching for a modularity method for a bipartite network. > > I am amazed by graph tool and the algorithms within. But I am having > truble with a basic question (at least I think it is). > > 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? > > In short, I want to write down (terminal or file) the vertices from the > graph (with its node names) for each level and respective block. I suppose > it can be done, because the info is in the draw, but I do not know how. > > Thanks in advance! Great job with graph tool, and the stochastic block > model (which I haven't completely understood, but I will). > > Tech info: > I work with graph-tool 2.16-1 under Arch Linux, with Python 3.5, if that > matters. > The bipartite network have 2230 vertices and 246764 edges . > From the state summary: > l: 0, N: 2230, B: 174 > l: 1, N: 174, B: 68 > l: 2, N: 68, B: 26 > l: 3, N: 26, B: 9 > l: 4, N: 9, B: 3 > l: 5, N: 3, B: 1 > > Have a great day! > ____ > *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,* > *Ciudad de México, 07340, México* > *Mobile Phone: 33 1551 3665* > *E-Mail: [email protected] <[email protected]>* > > _______________________________________________ > graph-tool mailing list > [email protected] > https://lists.skewed.de/mailman/listinfo/graph-tool > >
_______________________________________________ graph-tool mailing list [email protected] https://lists.skewed.de/mailman/listinfo/graph-tool
