-
-
Notifications
You must be signed in to change notification settings - Fork 206
Changes between main and next for review #2421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,8 @@ centralization.evcent.tmax <- function( | |||||||
| #' `centralization.evcent()` was renamed to [centr_eigen()] to create a more | ||||||||
| #' consistent API. | ||||||||
| #' @inheritParams centr_eigen | ||||||||
| #' @param directed logical scalar, whether to use directed shortest paths for | ||||||||
| #' calculating eigenvector centrality. | ||||||||
| #' @keywords internal | ||||||||
| #' @export | ||||||||
| centralization.evcent <- function( | ||||||||
|
|
@@ -306,7 +308,7 @@ NULL | |||||||
| #' | ||||||||
| #' # Calculate centralization from pre-computed scores | ||||||||
| #' deg <- degree(g) | ||||||||
| #' tmax <- centr_degree_tmax(g, loops = FALSE) | ||||||||
| #' tmax <- centr_degree_tmax(g, loops = "none") | ||||||||
| #' centralize(deg, tmax) | ||||||||
| #' | ||||||||
| #' # The most centralized graph according to eigenvector centrality | ||||||||
|
|
@@ -385,8 +387,11 @@ centr_degree <- function( | |||||||
| #' @param nodes The number of vertices. This is ignored if the graph is given. | ||||||||
| #' @param mode This is the same as the `mode` argument of `degree()`. Ignored | ||||||||
| #' if `graph` is given and the graph is undirected. | ||||||||
| #' @param loops Logical scalar, whether to consider loops edges when | ||||||||
| #' calculating the degree. | ||||||||
| #' @param loops Character string, | ||||||||
| #' `"none"` (the default) ignores loop edges; | ||||||||
| #' `"once"` counts each loop edge only once; | ||||||||
| #' `"twice"` counts each loop edge twice in undirected graphs. | ||||||||
| #' and once in directed graphs. | ||||||||
|
Comment on lines
+393
to
+394
|
||||||||
| #' `"twice"` counts each loop edge twice in undirected graphs. | |
| #' and once in directed graphs. | |
| #' `"twice"` counts each loop edge twice in undirected graphs and once in directed graphs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember I wasn't sure about this. For centr_degree(), the default is "twice" IIRC. Is then the same loops value needed in the denominator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and everywhere: