lemon/topology.h
changeset 2035 e92071fadd3f
parent 1956 a055123339d5
child 2038 33db14058543
equal deleted inserted replaced
14:583f6f99c0a2 15:228c232a45c9
  1415     }
  1415     }
  1416     for(EdgeIt i(graph);i!=INVALID;++i){
  1416     for(EdgeIt i(graph);i!=INVALID;++i){
  1417       if(bfs.dist(graph.source(i))==bfs.dist(graph.target(i)))return false;
  1417       if(bfs.dist(graph.source(i))==bfs.dist(graph.target(i)))return false;
  1418     }
  1418     }
  1419     return true;
  1419     return true;
  1420   };
  1420   }
  1421   
  1421   
  1422   /// \ingroup topology
  1422   /// \ingroup topology
  1423   ///
  1423   ///
  1424   /// \brief Check if the given undirected graph is bipartite or not
  1424   /// \brief Check if the given undirected graph is bipartite or not
  1425   ///
  1425   ///
  1457     }
  1457     }
  1458     for(EdgeIt i(graph);i!=INVALID;++i){
  1458     for(EdgeIt i(graph);i!=INVALID;++i){
  1459       if(bfs.dist(graph.source(i)) == bfs.dist(graph.target(i)))return false;
  1459       if(bfs.dist(graph.source(i)) == bfs.dist(graph.target(i)))return false;
  1460     }
  1460     }
  1461     return true;
  1461     return true;
  1462   };
  1462   }
  1463    
  1463    
  1464 } //namespace lemon
  1464 } //namespace lemon
  1465 
  1465 
  1466 #endif //LEMON_TOPOLOGY_H
  1466 #endif //LEMON_TOPOLOGY_H