score_sequence#
- score_sequence(G)[source]#
Returns the score sequence for the given tournament graph.
The score sequence is the sorted list of the out-degrees of the nodes of the graph.
- Parameters:
- GNetworkX graph
A directed graph representing a tournament.
- Returns:
- list
A sorted list of the out-degrees of the nodes of
G
.
Examples
>>> G = nx.DiGraph([(1, 0), (1, 3), (0, 2), (0, 3), (2, 1), (3, 2)]) >>> nx.is_tournament(G) True >>> nx.tournament.score_sequence(G) [1, 1, 2, 2] ----
Additional backends implement this function
graphblas : OpenMP-enabled sparse linear algebra backend.