public function getIndexVertex(Vertex $vertex)
    {
        $id = array_search($vertex, $this->vertices, true);
        if ($id === false) {
            throw new OutOfBoundsException('Given vertex does NOT exist');
        }
        return $id;
    }
public function getIndexVertex(Vertex $vertex)
    {
        $id = array_search($vertex, $this->vertices, true);
        if ($id === false) {
            throw new OutOfBoundsException('Given vertex does NOT exist');
        }
        return $id;
    }
public function getIndexVertex ( Vertex $ vertex ) { $ id = array_search ( $ vertex , $ this -> vertices , true ) ; if ( $ id === false ) { throw new OutOfBoundsException ( 'Given vertex does NOT exist' ) ; } return $ id ; }
get array index for given Vertex

not every set of Vertices represents a map, as such array index and
Vertex ID do not necessarily have to match.

@param Vertex $vertex
@throws OutOfBoundsException
@return mixed
get array index for given Vertex