You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The correct result is 3. Note that the degree is not the same as the number of incident edges. It is the number of edge endpoints.
Certainly, one may reinterpret the meaning of "degree", but diverging from the de-facto standard textbook definition is not a good idea. It is going to be extremely confusing for users.
The text was updated successfully, but these errors were encountered:
The
.degree()
method returns incorrect (or at least very unusual) results for undirected graphs with self-loops.Example:
The correct result is 3. Note that the degree is not the same as the number of incident edges. It is the number of edge endpoints.
Certainly, one may reinterpret the meaning of "degree", but diverging from the de-facto standard textbook definition is not a good idea. It is going to be extremely confusing for users.
The text was updated successfully, but these errors were encountered: