Gliph\Graph\UndirectedAdjacencyList::ensureEdge PHP Méthode

ensureEdge() public méthode

public ensureEdge ( $from, $to )
    public function ensureEdge($from, $to)
    {
        $this->ensureVertex($from)->ensureVertex($to);
        if (!$this->vertices[$from]->contains($to)) {
            $this->size++;
        }
        $this->vertices[$from]->attach($to);
        $this->vertices[$to]->attach($from);
    }