Add in_degree computation functions