Exemple #1
0
	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)
Exemple #2
0
	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)
Exemple #3
0
	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