[BGL] Detection of cycles in graphs