Module Expr Str Import alias identifier ImportFrom alias Assign NameStore ListLoad Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Dict Str Num FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad GeneratorExp TupleLoad NameLoad AttributeLoad NameLoad attr comprehension NameStore BinOpSub BinOpSub Call NameLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Return Call NameLoad BinOpSub BinOpSub Call NameLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call NameLoad ListLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore GeneratorExp TupleLoad NameLoad DictComp NameLoad AttributeLoad NameLoad attr comprehension NameStore BinOpSub BinOpSub Call NameLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call NameLoad ListLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore GeneratorExp TupleLoad NameLoad DictComp NameLoad AttributeLoad NameLoad attr comprehension NameStore BinOpSub BinOpSub Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call NameLoad ListLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body For TupleStore NameStore NameStore NameLoad body Expr Yield TupleLoad NameLoad BinOpAdd Call NameLoad NameLoad CompareIn NameLoad NameLoad orelse For TupleStore NameStore NameStore NameLoad body Expr Yield TupleLoad NameLoad BinOpAdd Call NameLoad GeneratorExp Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Num comprehension NameStore NameLoad BoolOpAnd CompareIn NameLoad NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Yield TupleLoad NameLoad BinOpSub BinOpSub Call NameLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call NameLoad ListLoad NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assert CompareIn NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assert CompareIn NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Slice Num Num Assert CompareEq Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad GeneratorExp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assert CompareEq Call NameLoad GeneratorExp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Str Assert CompareEq Call NameLoad GeneratorExp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad GeneratorExp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad
N/A N/A  Complement graph class for small footprint when working on dense graphs.

This class allows you to add the edges that *do not exist* in the dense
graph. However, when applying algorithms to this complement graph data
structure, it behaves as if it were the dense version. So it can be used
directly in several NetworkX algorithms.

This subclass has only been tested for k-core, connected_components,
and biconnected_components algorithms but might also work for other
algorithms.

 N/A networkx nx networkx.exception NetworkXError N/A __all__ N/A AntiGraph AntiGraph N/A N/A nx Graph N/A N/A 
    Class for complement graphs.

    The main goal is to be able to work with big and dense graphs with
    a low memory foodprint.

    In this class you add the edges that *do not exist* in the dense graph,
    the report methods of the class return the neighbors, the edges and
    the degree as if it was the dense graph. Thus it's possible to use
    an instance of this class with some of NetworkX functions.
     N/A all_edge_dict N/A weight 1 single_edge_dict N/A N/A self N/A N/A N/A N/A self all_edge_dict N/A N/A edge_attr_dict_factory single_edge_dict __getitem__ N/A N/A self n N/A N/A N/A Return a dict of neighbors of node n in the dense graph.

        Parameters
        ----------
        n : node
           A node in the graph.

        Returns
        -------
        adj_dict : dictionary
           The adjacency dictionary for nodes connected to n.

         N/A N/A dict N/A N/A node N/A self all_edge_dict N/A node N/A N/A N/A set N/A self adj N/A set N/A N/A self adj N/A n N/A set N/A n N/A neighbors N/A N/A self n N/A N/A N/A Return an iterator over all neighbors of node n in the 
           dense graph.

         N/A N/A N/A N/A iter N/A N/A N/A set N/A self adj N/A set N/A N/A self adj N/A n N/A set N/A n N/A N/A N/A KeyError N/A N/A N/A NetworkXError N/A The node %s is not in the graph. N/A n N/A degree N/A N/A self nbunch weight N/A None None N/A N/A Return an iterator for (node, degree) in the dense graph.

        The node degree is the number of edges adjacent to the node.

        Parameters
        ----------
        nbunch : iterable container, optional (default=all nodes)
            A container of nodes.  The container will be iterated
            through once.

        weight : string or None, optional (default=None)
           The edge attribute that holds the numerical value used
           as a weight.  If None, then each edge has weight 1.
           The degree is the sum of the edge weights adjacent to the node.

        Returns
        -------
        nd_iter : iterator
            The iterator returns two-tuples of (node, degree).

        See Also
        --------
        degree

        Examples
        --------
        >>> G = nx.path_graph(4) # or DiGraph, MultiGraph, MultiDiGraph, etc
        >>> list(G.degree(0)) # node 0 with degree 1
        [(0, 1)]
        >>> list(G.degree([0,1]))
        [(0, 1), (1, 2)]

         N/A N/A nbunch None N/A N/A nodes_nbrs N/A N/A n N/A v N/A self all_edge_dict N/A v N/A N/A N/A set N/A self adj N/A set N/A N/A self adj N/A n N/A set N/A n N/A n N/A N/A self nodes N/A N/A nodes_nbrs N/A N/A n N/A v N/A self all_edge_dict N/A v N/A N/A N/A set N/A N/A self nodes N/A set N/A N/A self adj N/A n N/A set N/A n N/A n N/A N/A self nbunch_iter nbunch N/A N/A weight None N/A N/A N/A n nbrs nodes_nbrs N/A N/A N/A N/A n N/A N/A len nbrs N/A n nbrs N/A N/A N/A n nbrs nodes_nbrs N/A N/A N/A N/A n N/A N/A sum N/A N/A N/A N/A nbrs N/A nbr get weight 1 N/A nbr nbrs N/A N/A n nbrs N/A N/A N/A nbrs N/A n get weight 1 N/A adjacency_iter N/A N/A self N/A N/A N/A Return an iterator of (node, adjacency set) tuples for all nodes
           in the dense graph.

        This is the fastest way to look at every edge.
        For directed graphs, only outgoing adjacencies are included.

        Returns
        -------
        adj_iter : iterator
           An iterator of (node, adjacency set) for all nodes in
           the graph.

         N/A n N/A self adj N/A N/A N/A N/A n N/A N/A N/A set N/A self adj N/A set N/A N/A self adj N/A n N/A set N/A n N/A N/A N/A N/A __name__ __main__ N/A N/A Gnp N/A N/A nx gnp_random_graph 20 0.8 N/A Anp N/A AntiGraph N/A N/A nx complement Gnp N/A Gd N/A N/A nx davis_southern_women_graph N/A Ad N/A AntiGraph N/A N/A nx complement Gd N/A Gk N/A N/A nx karate_club_graph N/A Ak N/A AntiGraph N/A N/A nx complement Gk N/A pairs N/A N/A Gnp Anp N/A Gd Ad N/A Gk Ak N/A N/A G A pairs N/A N/A gc N/A N/A set c N/A c N/A N/A nx connected_components G N/A ac N/A N/A set c N/A c N/A N/A nx connected_components A N/A comp ac N/A N/A N/A comp gc N/A N/A G A pairs N/A N/A gc N/A N/A set c N/A c N/A N/A nx biconnected_components G N/A ac N/A N/A set c N/A c N/A N/A nx biconnected_components A N/A comp ac N/A N/A N/A comp gc N/A N/A G A pairs N/A N/A node N/A N/A list N/A N/A G nodes N/A 0 N/A nodes N/A N/A list N/A N/A G nodes N/A 1 4 N/A N/A N/A N/A G degree node N/A N/A A degree node N/A N/A N/A sum N/A d N/A N/A n d N/A N/A G degree N/A sum N/A d N/A N/A n d N/A N/A A degree N/A N/A N/A sum N/A d N/A N/A n d N/A N/A A degree N/A sum N/A d N/A N/A n d N/A N/A A degree weight weight N/A N/A N/A sum N/A d N/A N/A n d N/A N/A G degree nodes N/A sum N/A d N/A N/A n d N/A N/A A degree nodes