Is there a method in graph-tool through which checking whether two nodes are connected (as first neighbours) or not without having to iterate?
For example, something like graph_tool.is_connected(v,u) which returns a boolean depending on whether v and u are or not connected vertices. Something like a function to check just whether a certain edge exists.
Thanks
It is solved by checking the result of the function
g.edge(v,u). Ifadd_missing=Falseit just returnsNonewhenever the edge does not exist. Thanks to @NerdOnTour for the comment