clustering-coefficient and supporting methods