Gliph\Graph\UndirectedAdjacencyList::adjacentTo PHP Метод

adjacentTo() публичный Метод

public adjacentTo ( $vertex )
    public function adjacentTo($vertex)
    {
        if (!$this->hasVertex($vertex)) {
            throw new NonexistentVertexException('Vertex is not in graph; cannot iterate over its adjacent vertices.');
        }
        $set = $this->getTraversableSplos($this->vertices[$vertex]);
        foreach ($set as $adjacent_vertex) {
            (yield $adjacent_vertex);
        }
        $this->walking->detach($set);
    }