Changes in lemon/connectivity.h [956:141f9c0db4a3:1268:19087d4f215d] in lemon
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/connectivity.h
r956 r1268 746 746 /// 747 747 /// This function checks whether the given undirected graph is 748 /// binodeconnected, i.e. any two edges are on same circle. 748 /// binodeconnected, i.e. a connected graph without articulation 749 /// node. 749 750 /// 750 751 /// \return \c true if the graph binodeconnected. 751 /// \note By definition, the empty graph is binodeconnected. 752 /// 753 /// \note By definition, 754 /// \li a graph consisting of zero or one node is binodeconnected, 755 /// \li a graph consisting of two isolated nodes 756 /// is \e not binodeconnected and 757 /// \li a graph consisting of two nodes connected by an edge 758 /// is binodeconnected. 752 759 /// 753 760 /// \see countBiNodeConnectedComponents(), biNodeConnectedComponents() 754 761 template <typename Graph> 755 762 bool biNodeConnected(const Graph& graph) { 763 bool hasNonIsolated = false, hasIsolated = false; 764 for (typename Graph::NodeIt n(graph); n != INVALID; ++n) { 765 if (typename Graph::OutArcIt(graph, n) == INVALID) { 766 if (hasIsolated  hasNonIsolated) { 767 return false; 768 } else { 769 hasIsolated = true; 770 } 771 } else { 772 if (hasIsolated) { 773 return false; 774 } else { 775 hasNonIsolated = true; 776 } 777 } 778 } 756 779 return countBiNodeConnectedComponents(graph) <= 1; 757 780 }
Note: See TracChangeset
for help on using the changeset viewer.