public function hasUndirected()
    {
        foreach ($this->set->getEdges() as $edge) {
            if ($edge instanceof EdgeUndirected) {
                return true;
            }
        }

        return false;
    }
public function hasUndirected()
    {
        foreach ($this->set->getEdges() as $edge) {
            if ($edge instanceof EdgeUndirected) {
                return true;
            }
        }

        return false;
    }
public function hasUndirected ( ) { foreach ( $ this -> set -> getEdges ( ) as $ edge ) { if ( $ edge instanceof EdgeUndirected ) { return true ; } } return false ; }
checks whether the graph has any undirected edges

This method is intentionally not named "isUndirected()",
because that might be misleading in regards to empty and/or mixed graphs.

@return boolean
checks whether the graph has any undirected edges