.. _digraph: ======= DiGraph ======= Overview -------- .. currentmodule:: networkx .. autoclass:: DiGraph Adding and Removing Nodes and Edges ----------------------------------- .. autosummary:: :toctree: generated/ DiGraph.add_node DiGraph.add_nodes_from DiGraph.remove_node DiGraph.remove_nodes_from DiGraph.add_edge DiGraph.add_edges_from DiGraph.remove_edge DiGraph.remove_edges_from DiGraph.add_star DiGraph.add_path DiGraph.add_cycle DiGraph.clear Iterating over nodes and edges ------------------------------ .. autosummary:: :toctree: generated/ DiGraph.nodes DiGraph.nodes_iter DiGraph.__iter__ DiGraph.edges DiGraph.edges_iter DiGraph.get_edge DiGraph.neighbors DiGraph.neighbors_iter DiGraph.__getitem__ DiGraph.successors DiGraph.successors_iter DiGraph.predecessors DiGraph.predecessors_iter DiGraph.adjacency_list DiGraph.adjacency_iter DiGraph.nbunch_iter Information about graph structure --------------------------------- .. autosummary:: :toctree: generated/ DiGraph.has_node DiGraph.__contains__ DiGraph.has_edge DiGraph.has_neighbor DiGraph.nodes_with_selfloops DiGraph.selfloop_edges DiGraph.order DiGraph.number_of_nodes DiGraph.__len__ DiGraph.size DiGraph.number_of_edges DiGraph.number_of_selfloops DiGraph.degree DiGraph.degree_iter Making copies and subgraphs --------------------------- .. autosummary:: :toctree: generated/ DiGraph.copy DiGraph.to_undirected DiGraph.subgraph DiGraph.reverse