This algorithm determines the average nearest neighbor degree.
This algorithm was written by Duygu Balcan and integrated by Russell Duhon.