Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

networkx.algorithms.asteroidal.is_at_free

is_at_free(G)[source]

Check if a graph is AT-free.

The method uses the find_asteroidal_triple method to recognize an AT-free graph. If no asteroidal triple is found the graph is AT-free and True is returned. If at least one asteroidal triple is found the graph is not AT-free and False is returned.

Parameters

G (NetworkX Graph) – The graph to check whether is AT-free or not.

Returns

True if G is AT-free and False otherwise.

Return type

bool

Examples

>>> G = nx.Graph([(0, 1), (0, 2), (1, 2), (1, 3), (1, 4), (4, 5)])
>>> nx.is_at_free(G)
True
>>> G = nx.cycle_graph(6)
>>> nx.is_at_free(G)
False