Compute the graph degree, diameter, etc.
Indeed, this info can be useful for some algo, and would avoid one to hard-code it in the algo, which outgh to work on any graph.
For example, in the following example, the diameter is hard-coded : https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/sasa/blob/master/test/bfs-spanning-tree/p.ml