complete implementation: Assortativity coefficient (Newman, 2002, Assortative Mixing in Networks)