Hello list,
I am currently working with graph_tool to analyse text documents. let's say
that in my graph each vertex is a word that appears in the text and each
edge corresponds to a relationship between two words. Because of the fact
that vertex is individuated only by its index i suppose to use a vertex
property map (let's call it 'name', of type 'string') to put the word
related to the vertex, assuring a bijective property of the "word <-> vertex
index" function.
Intuitively i'd like to do something like idx = g.vertex("example").
I cannot see how to implement it with the PropertyMaps because i can only
have the function "vertex index -> word".
I cannot keep the "word -> vertex index" elsewhere because remove_vertex()
is changing my indexes under my feet.
Does anybody of you have a suggestion?
Thank you very much,
Elia Bruni