Merge Duplication Divergence Graph Generator (#1210)

Merge #1210 with cleanup.
I think that it does not hurt to allow `p == 0`.