Module Expr Str Import alias identifier ImportFrom alias alias Assign NameStore ListLoad Str FunctionDef arguments args NameParam defaults body Expr Str If CompareEq Call NameLoad NameLoad Num body Raise Call AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad decorator_list Call NameLoad Str
N/A N/A Semiconnectedness. N/A networkx nx networkx.utils not_implemented_for pairwise N/A __all__ N/A is_semiconnected is_semiconnected N/A N/A G N/A N/A N/A Return True if the graph is semiconnected, False otherwise.

    A graph is semiconnected if, and only if, for any pair of nodes, either one
    is reachable from the other, or they are mutually reachable.

    Parameters
    ----------
    G : NetworkX graph
        A directed graph.

    Returns
    -------
    semiconnected : bool
        True if the graph is semiconnected, False otherwise.

    Raises
    ------
    NetworkXNotImplemented :
        If the input graph is undirected.

    NetworkXPointlessConcept :
        If the graph is empty.

    Examples
    --------
    >>> G=nx.path_graph(4,create_using=nx.DiGraph())
    >>> print(nx.is_semiconnected(G))
    True
    >>> G=nx.DiGraph([(1, 2), (3, 2)])
    >>> print(nx.is_semiconnected(G))
    False

    See Also
    --------
    is_strongly_connected
    is_weakly_connected
    is_connected
    is_biconnected
     N/A N/A N/A len G 0 N/A N/A N/A N/A nx NetworkXPointlessConcept Connectivity is undefined for the null graph. N/A N/A N/A N/A nx is_weakly_connected G N/A N/A False N/A G N/A N/A nx condensation G N/A path N/A N/A nx topological_sort G N/A N/A all N/A N/A N/A G has_edge u v N/A N/A u v N/A pairwise path N/A N/A not_implemented_for undirected