Add DirectedAcyclicGraph constructor that takes an EdgeFactory.