public function getGroups()
    {
        $groups = array();
        foreach ($this->graph->getVertices() as $vertex) {
            $groups[$vertex->getGroup()] = true;
        }

        return array_keys($groups);
    }
public function getGroups()
    {
        $groups = array();
        foreach ($this->graph->getVertices() as $vertex) {
            $groups[$vertex->getGroup()] = true;
        }

        return array_keys($groups);
    }
public function getGroups ( ) { $ groups = array ( ) ; foreach ( $ this -> graph -> getVertices ( ) as $ vertex ) { $ groups [ $ vertex -> getGroup ( ) ] = true ; } return array_keys ( $ groups ) ; }
get vector of all group numbers

@return int[]
@uses Vertex::getGroup()
get vector of all group numbers