/**
  * @inheritdoc
  */
 public function mergeWith(Graph $graph) : Graph
 {
     foreach ($graph->getNodes() as $node) {
         $this->addNodeWithNoMerge($node);
     }
     $this->edges = array_merge($this->edges, $graph->getEdges());
     return $this;
 }
Beispiel #2
0
 public function AddAsChild($node, $parent)
 {
     $arrow = new DefaultEdge($parent, $node);
     $this->graph->addEdge($arrow);
     return $this;
 }