Gliph\Graph\DirectedAdjacencyList::arcsTo PHP Method

arcsTo() public method

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