Clustering in complex networks. I. General formalism | Synapse