ModularityPartitionScore: fix performance issues
ModularityPartitionScore: fix performance issues

fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit