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);
}