Adding constructor based on an AbstractGraph
Manually fixed merge conflict