networkx の API リファレンス
networkx (networkx/networkx) の公開 API 144 件 —— クラス 47、関数 63、メソッド 34。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: networkx/networkx
| 種別 | 件数 |
|---|---|
| クラス | 47 |
| 関数 | 63 |
| メソッド | 34 |
API 一覧
class
networkx.algorithms.approximation.kcomponents._AntiGraph.AntiAdjacencyViewAn adjacency outer dict for AntiGraph
class
networkx.algorithms.approximation.kcomponents._AntiGraph.AntiAtlasViewAn adjacency inner dict for AntiGraph
class
networkx.algorithms.approximation.treewidth.MinDegreeHeuristicImplements the Minimum Degree heuristic.
func
networkx.algorithms.asteroidal.is_at_free(G)Check if a graph is AT-free.
func
networkx.algorithms.bipartite.basic.color(G)Returns a two-coloring of the graph.
func
networkx.algorithms.bridges.bridges(G, root=None)Generate all bridges in a graph.
func
networkx.algorithms.centrality.load.edge_load_centrality(G, cutoff=False)Compute edge load.
func
networkx.algorithms.chordal.is_chordal(G)Checks whether G is a chordal graph.
class
networkx.algorithms.clique.MaxWeightCliqueA class for the maximum weight clique algorithm.
method
networkx.algorithms.clique.MaxWeightClique.find_max_weight_clique()Find a maximum weight clique.
func
networkx.algorithms.cluster.triangles(G, nodes=None)Compute the number of triangles.
class
networkx.algorithms.community.quality.NotAPartitionRaised if a given collection is not a partition.
func
networkx.algorithms.components.connected.connected_components(G)Generate connected components.
func
networkx.algorithms.core.core_number(G)Returns the core number for each node.
func
networkx.algorithms.core.k_core(G, k=None, core_number=None)Returns the k-core of G.
func
networkx.algorithms.core.k_corona(G, k, core_number=None)Returns the k-corona of G.
func
networkx.algorithms.core.k_crust(G, k=None, core_number=None)Returns the k-crust of G.
func
networkx.algorithms.core.k_shell(G, k=None, core_number=None)Returns the k-shell of G.
func
networkx.algorithms.core.k_truss(G, k)Returns the k-truss of `G`.
func
networkx.algorithms.cuts.volume(G, S, weight=None)Returns the volume of a set of nodes.
func
networkx.algorithms.cycles.girth(G)Returns the girth of the graph.
func
networkx.algorithms.dag.topological_generations(G)Stratifies a DAG into generations.
func
networkx.algorithms.euler.is_semieulerian(G)Return True iff `G` is semi-Eulerian.
func
networkx.algorithms.flow.boykovkolmogorov.adopt()Adoption stage.
func
networkx.algorithms.flow.boykovkolmogorov.augment(u, v)Augmentation stage.
func
networkx.algorithms.flow.networksimplex.add_entry(e)Add a flow dict entry.
func
networkx.algorithms.flow.preflowpush.gap_heuristic(height)Apply the gap heuristic.
func
networkx.algorithms.flow.preflowpush.push(u, v, flow)Push flow units of flow from u to v.
class
networkx.algorithms.flow.utils.LevelActive and inactive nodes in a level.
func
networkx.algorithms.isolate.isolates(G)Iterator over isolates in the graph.
class
networkx.algorithms.isomorphism.ismags.EdgeLookupClass to handle getitem for undirected edges.
class
networkx.algorithms.isomorphism.ismags.ISMAGSImplements the ISMAGS subgraph matching algorithm.
class
networkx.algorithms.isomorphism.vf2userfunc.DiGraphMatcherVF2 isomorphism checker for directed graphs.
class
networkx.algorithms.isomorphism.vf2userfunc.GraphMatcherVF2 isomorphism checker for undirected graphs.
class
networkx.algorithms.isomorphism.vf2userfunc.MultiDiGraphMatcherVF2 isomorphism checker for directed multigraphs.
class
networkx.algorithms.isomorphism.vf2userfunc.MultiGraphMatcherVF2 isomorphism checker for undirected multigraphs.
class
networkx.algorithms.matching.BlossomRepresentation of a non-trivial blossom or sub-blossom.
class
networkx.algorithms.matching.NoNodeDummy value which is different from any node.
func
networkx.algorithms.operators.all.union_all(graphs, rename=())Returns the union of all graphs.
func
networkx.algorithms.operators.binary.disjoint_union(G, H)Combine graphs G and H.
func
networkx.algorithms.operators.binary.union(G, H, rename=())Combine graphs G and H.
func
networkx.algorithms.operators.unary.complement(G)Returns the graph complement of G.
class
networkx.algorithms.planarity.ConflictPairRepresents a different constraint between two intervals.
method
networkx.algorithms.planarity.ConflictPair.swap()Swap left and right intervals
class
networkx.algorithms.planarity.IntervalRepresents a set of return edges.
method
networkx.algorithms.planarity.Interval.copy()Returns a copy of this interval
method
networkx.algorithms.planarity.Interval.empty()Check if the interval is empty
class
networkx.algorithms.planarity.LRPlanarityA class to maintain the state during planarity check.
method
networkx.algorithms.planarity.LRPlanarity.dfs_embedding(v)Completes the embedding.
method
networkx.algorithms.planarity.LRPlanarity.dfs_testing(v)Test for LR partition.
method
networkx.algorithms.planarity.LRPlanarity.lr_planarity()Execute the LR planarity test.
class
networkx.algorithms.planarity.PlanarEmbeddingRepresents a planar graph with its planar embedding.
method
networkx.algorithms.planarity.PlanarEmbedding.is_directed()A valid PlanarEmbedding is undirected.
method
networkx.algorithms.planarity.PlanarEmbedding.remove_node(n)Remove node n.
method
networkx.algorithms.planarity.PlanarEmbedding.remove_nodes_from(nodes)Remove multiple nodes.
func
networkx.algorithms.planarity.get_counterexample(G)Obtains a Kuratowski subgraph.
func
networkx.algorithms.regular.is_regular(G)Determines whether a graph is regular.
func
networkx.algorithms.regular.k_factor(G, k, matching_weight='weight')Compute a `k`-factor of a graph.
func
networkx.algorithms.smetric.s_metric(G)Returns the s-metric [1]_ of graph.
class
networkx.algorithms.tree.mst.EdgePartitionAn enum to store the state of an edge partition.
func
networkx.algorithms.tree.recognition.is_forest(G)Returns True if `G` is a forest.
func
networkx.algorithms.tree.recognition.is_tree(G)Returns True if `G` is a tree.
class
networkx.classes.coreviews.AdjacencyViewAn AdjacencyView is a Read-only Map of Maps of Maps.
class
networkx.classes.coreviews.AtlasViewAn AtlasView is a Read-only Mapping of Mappings.
class
networkx.classes.coreviews.UnionAtlasA read-only union of two atlases (dict-of-dict).
class
networkx.classes.coreviews.UnionMultiAdjacencyA read-only union of two dict MultiAdjacencies.
class
networkx.classes.coreviews.UnionMultiInnerA read-only union of two inner dicts of MultiAdjacencies.
class
networkx.classes.digraph.DiGraphBase class for directed graphs.
method
networkx.classes.digraph.DiGraph.add_edge(u_of_edge, v_of_edge, **attr)Add an edge between u and v.
method
networkx.classes.digraph.DiGraph.add_edges_from(ebunch_to_add, **attr)Add all the edges in ebunch_to_add.
method
networkx.classes.digraph.DiGraph.add_nodes_from(nodes_for_adding, **attr)Add multiple nodes.
method
networkx.classes.digraph.DiGraph.remove_edge(u, v)Remove the edge between u and v.
method
networkx.classes.digraph.DiGraph.remove_node(n)Remove node n.
method
networkx.classes.digraph.DiGraph.remove_nodes_from(nodes)Remove multiple nodes.
method
networkx.classes.digraph.DiGraph.reverse(copy=True)Returns the reverse of the graph.
class
networkx.classes.filters.show_nodesFilter class to show specific nodes.
func
networkx.classes.function.add_star(G_to_add_to, nodes_for_star, **attr)Add a star to Graph G_to_add_to.
func
networkx.classes.function.density(G)Returns the density of a graph.
func
networkx.classes.function.is_directed(G)Return True if graph is directed.
func
networkx.classes.function.is_empty(G)Returns True if `G` has no edges.
func
networkx.classes.function.is_frozen(G)Returns True if graph is frozen.
func
networkx.classes.function.nodes(G)Returns a NodeView over the graph nodes.
func
networkx.classes.function.number_of_edges(G)Returns the number of edges in the graph.
func
networkx.classes.function.number_of_selfloops(G)Returns the number of selfloop edges.
class
networkx.classes.graph.GraphBase class for undirected graphs.
method
networkx.classes.graph.Graph.add_edge(u_of_edge, v_of_edge, **attr)Add an edge between u and v.
method
networkx.classes.graph.Graph.add_edges_from(ebunch_to_add, **attr)Add all the edges in ebunch_to_add.
method
networkx.classes.graph.Graph.add_nodes_from(nodes_for_adding, **attr)Add multiple nodes.
method
networkx.classes.graph.Graph.copy(as_view=False)Returns a copy of the graph.
method
networkx.classes.graph.Graph.name()String identifier of the graph.
method
networkx.classes.graph.Graph.order()Returns the number of nodes in the graph.
method
networkx.classes.graph.Graph.remove_edge(u, v)Remove the edge between u and v.
method
networkx.classes.graph.Graph.remove_node(n)Remove node n.
method
networkx.classes.graph.Graph.remove_nodes_from(nodes)Remove multiple nodes.
method
networkx.classes.graph.Graph.update(edges=None, nodes=None)Update the graph using nodes/edges/graphs as input.
func
networkx.classes.graphviews.generic_graph_view(G, create_using=None)Returns a read-only view of `G`.
class
networkx.classes.multidigraph.MultiDiGraphA directed graph class that can store multiedges.
class
networkx.classes.multigraph.MultiGraphAn undirected graph class that can store multiedges.
method
networkx.classes.multigraph.MultiGraph.copy(as_view=False)Returns a copy of the graph.
method
networkx.classes.multigraph.MultiGraph.edges()Returns an iterator over the edges.
method
networkx.classes.multigraph.MultiGraph.remove_edge(u, v, key=None)Remove an edge between u and v.
class
networkx.classes.reportviews.DiMultiDegreeViewA DegreeView class for MultiDiGraph; See DegreeView
class
networkx.classes.reportviews.InEdgeViewA EdgeView class for inward edges of a DiGraph
class
networkx.classes.reportviews.InMultiEdgeViewA EdgeView class for inward edges of a MultiDiGraph
class
networkx.classes.reportviews.MultiEdgeViewA EdgeView class for edges of a MultiGraph
class
networkx.classes.reportviews.OutEdgeViewA EdgeView class for outward edges of a DiGraph
class
networkx.classes.reportviews.OutMultiEdgeViewA EdgeView class for outward edges of a MultiDiGraph
func
networkx.convert.to_edgelist(G, nodelist=None)Returns a list of edges in the graph.
func
networkx.drawing.layout.circular_layout(G, scale=1, center=None, dim=2, store_pos_as=None)Position nodes on a circle.
class
networkx.drawing.nx_pylab.FancyArrowFactoryDraw arrows with `matplotlib.patches.FancyarrowPatch`
func
networkx.drawing.nx_pylab.display(G, canvas=None, **kwargs)Draw the graph G.
func
networkx.drawing.nx_pylab.draw(G, pos=None, ax=None, **kwds)Draw the graph G with Matplotlib.
class
networkx.exception.ExceededMaxIterationsRaised if a loop iterates too many times without breaking.
class
networkx.exception.NetworkXAlgorithmErrorException for unexpected termination of algorithms.
class
networkx.exception.NetworkXErrorException for a serious error in NetworkX
class
networkx.exception.NetworkXExceptionBase class for exceptions in NetworkX.
func
networkx.generators.classic.star_graph(n, create_using=None)Return a star graph.
func
networkx.generators.community.windmill_graph(n, k)Generate a windmill graph.
func
networkx.generators.expanders.maybe_regular_expander(n, d, *create_using=None, *max_tries=100, *seed=None)..
class
networkx.generators.internet_as_graphs.AS_graph_generatorGenerates random internet AS graphs.
func
networkx.generators.small.frucht_graph(create_using=None)Returns the Frucht Graph.
func
networkx.generators.small.pappus_graph()Returns the Pappus graph.
func
networkx.generators.small.petersen_graph(create_using=None)Returns the Petersen Graph.
func
networkx.generators.small.tutte_graph(create_using=None)Returns the Tutte graph.
func
networkx.generators.social.karate_club_graph()Returns Zachary's Karate Club graph.
func
networkx.generators.sudoku.sudoku_graph(n=3)Returns the n-Sudoku graph.
func
networkx.readwrite.gml.parse_gml_lines(lines, label, destringizer)Parse GML `lines` into a graph.
class
networkx.readwrite.graphml.GraphMLReaderRead a GraphML document.
method
networkx.readwrite.graphml.GraphMLReader.add_edge(G, edge_element, graphml_keys)Add an edge to the graph.
method
networkx.readwrite.graphml.GraphMLReader.add_node(G, node_xml, graphml_keys, defaults)Add a node to the graph.
func
networkx.readwrite.p2g.read_p2g(path, encoding='utf-8')Read graph in p2g format from path.
func
networkx.readwrite.p2g.write_p2g(G, path, encoding='utf-8')Write NetworkX graph in p2g format.
func
networkx.readwrite.pajek.generate_pajek(G)Generate lines in Pajek graph format.
func
networkx.readwrite.pajek.make_qstr(t)Returns the string representation of t.
func
networkx.readwrite.sparse6.enc(x)Big endian k-bit encoding of x
class
networkx.utils.configs.ConfigThe base class for NetworkX configuration.
class
networkx.utils.heaps.BinaryHeapA binary heap.
class
networkx.utils.heaps.MinHeapBase class for min-heaps.
method
networkx.utils.heaps.MinHeap.min()Query the minimum key-value pair.
method
networkx.utils.heaps.MinHeap.pop()Delete the minimum pair in the heap.
class
networkx.utils.heaps.PairingHeapA pairing heap.
func
networkx.utils.misc.graphs_equal(graph1, graph2)Check if graphs are equal.
func
networkx.utils.misc.nodes_equal(nodes1, nodes2)Check if nodes are equal.
class
networkx.utils.union_find.UnionFindUnion-find data structure.
この情報について
掲載しているシグネチャは networkx/networkx の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。