A Measure of Segregation Based on Social Interactions