public function destroy()
    {
        foreach ($this->getEdges()->getEdgesDistinct() as $edge) {
            $edge->destroy();
        }
        $this->graph->removeVertex($this);
    }
public function destroy()
    {
        foreach ($this->getEdges()->getEdgesDistinct() as $edge) {
            $edge->destroy();
        }
        $this->graph->removeVertex($this);
    }
public function destroy ( ) { foreach ( $ this -> getEdges ( ) -> getEdgesDistinct ( ) as $ edge ) { $ edge -> destroy ( ) ; } $ this -> graph -> removeVertex ( $ this ) ; }
destroy vertex and all edges connected to it and remove reference from graph

@uses Edge::destroy()
@uses Graph::removeVertex()
destroy vertex and all edges connected to it and remove reference from graph