def connected_components(self): """ Connected components. @attention: Indentification of connected components is meaningful only for non-directed graphs. @rtype: list @return: List that associates each node to its connected component. """ return accessibility.connected_components(self)
def connected_components(self): """ Connected components. @attention: Indentification of connected components is meaningful only for non-directed graphs. @rtype: dictionary @return: Pairing that associates each node to its connected component. """ return accessibility.connected_components(self)
def connected_components(self): """ Connected components. @rtype: dictionary @return: Pairing that associates each node to its connected component. """ components_ = accessibility.connected_components(self.graph) components = {} for each in components_.keys(): if (each[1] == 'n'): components[each[0]] = components_[each] return components