lemon/euler.h
changeset 1991 d7442141d9ef
parent 1970 bd88ea06ab69
child 1993 2115143eceea
equal deleted inserted replaced
8:424db5705ef3 9:642a67a41442
   231   ///\todo Test required
   231   ///\todo Test required
   232   template<class Graph>
   232   template<class Graph>
   233 #ifdef DOXYGEN
   233 #ifdef DOXYGEN
   234   bool
   234   bool
   235 #else
   235 #else
   236   typename enable_if<typename Graph::UTag,bool>::type
   236   typename enable_if<UndirectedTagIndicator<Graph>,bool>::type
   237   euler(const Graph &g) 
   237   euler(const Graph &g) 
   238   {
   238   {
   239     for(typename Graph::NodeIt n(g);n!=INVALID;++n)
   239     for(typename Graph::NodeIt n(g);n!=INVALID;++n)
   240       if(countIncEdges(g,n)%2) return false;
   240       if(countIncEdges(g,n)%2) return false;
   241     return connected(g);
   241     return connected(g);
   242   }
   242   }
   243   template<class Graph>
   243   template<class Graph>
   244   typename disable_if<typename Graph::UTag,bool>::type
   244   typename disable_if<UndirectedTagIndicator<Graph>,bool>::type
   245 #endif
   245 #endif
   246   euler(const Graph &g) 
   246   euler(const Graph &g) 
   247   {
   247   {
   248     for(typename Graph::NodeIt n(g);n!=INVALID;++n)
   248     for(typename Graph::NodeIt n(g);n!=INVALID;++n)
   249       if(countInEdges(g,n)!=countOutEdges(g,n)) return false;
   249       if(countInEdges(g,n)!=countOutEdges(g,n)) return false;