MCPcopy Create free account
hub / github.com/alibaba/GraphScope / order

Method order

python/graphscope/nx/classes/graph.py:814–832  ·  view source on GitHub ↗

Returns the number of nodes in the graph. Returns ------- nnodes : int The number of nodes in the graph. See Also -------- number_of_nodes, __len__ which are identical Examples -------- >>> G = nx.path_graph(3)

(self)

Source from the content-addressed store, hash-verified

812 return archive.get_size()
813
814 def order(self):
815 """Returns the number of nodes in the graph.
816
817 Returns
818 -------
819 nnodes : int
820 The number of nodes in the graph.
821
822 See Also
823 --------
824 number_of_nodes, __len__ which are identical
825
826 Examples
827 --------
828 >>> G = nx.path_graph(3) # or DiGraph
829 >>> G.order()
830 3
831 """
832 return self.number_of_nodes()
833
834 def has_node(self, n):
835 """Returns True if the graph contains the node n.

Callers 7

BuildMethod · 0.45
BuildMethod · 0.45
BuildMethod · 0.45
funcFunction · 0.45
is_triadFunction · 0.45

Calls 1

number_of_nodesMethod · 0.95

Tested by 2

funcFunction · 0.36
is_triadFunction · 0.36