private function createEdgeCloneInternal(Edge $originalEdge, $ia, $ib)
    {
        $ends = $originalEdge->getVertices()->getIds();

        // get start vertex from old start vertex id
        $a = $this->getVertex($ends[$ia]);
        // get target vertex from old target vertex id
        $b = $this->getVertex($ends[$ib]);

        if ($originalEdge instanceof EdgeDirected) {
            $newEdge = $a->createEdgeTo($b);
        } else {
            // create new edge between new a and b
            $newEdge = $a->createEdge($b);
        }
        // TODO: copy edge attributes
        $newEdge->getAttributeBag()->setAttributes($originalEdge->getAttributeBag()->getAttributes());
        $newEdge->setWeight($originalEdge->getWeight());
        $newEdge->setFlow($originalEdge->getFlow());
        $newEdge->setCapacity($originalEdge->getCapacity());

        return $newEdge;
    }