Find_vertex and vector property map

Hi

Is there any efficient way (better than looping over all vertices) to find every vertex with specific element in vector property map?

I’m trying to create network of citations with authors as nodes, from network of papers, where edges are citations and every node has property vector<int64_t> with IDs of authors.

I tried find_vertex, but:

find_vertex(gcit, v_authors, [145654338])

will return only vertices (papers) written solo by 145654338.

Thanks!

This is a FAQ: https://graph-tool.skewed.de/static/doc/faq.html#how-do-i-retrieve-a-vertex-by-its-property-map-value

You can use the same idea described there, but use the authors ID for the vertex dictionary.

Thanks once again!

For anyone struggling with dictionaries, I recommend this library

https://awkward-array.org/doc/main/getting-started/index.html