Skip to content
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

docs: better describe output of all_shortest_paths() #1626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions R/structural.properties.R
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,16 @@ degree_distribution <- function(graph, cumulative = FALSE, ...) {
#' was not requested.} \item{inbound_edges}{Numeric vector, the inbound edge
#' for each vertex, or `NULL`, if it was not requested.}
#'
#' For `all_shortest_paths()` a list is returned, each list element
#' For `all_shortest_paths()` a list is returned:
#' \item{vpaths}{This is a list. Each list element
#' contains a shortest path from `from` to a vertex in `to`. The
#' shortest paths to the same vertex are collected into consecutive elements
#' of the list.
#' of the list.}
Comment on lines +791 to +795
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's write

... contains the vertices of a shortest path ...

#' \item{epaths}{This is a list similar to vpaths,
#' but the vectors of the list contain the edge ids along the shortest paths,
#' instead of the vertex ids.}
Comment on lines +797 to +798
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Let's decide whether we write "ID" or "id" and stick to it.

#' \item{nrgeo}{Number of geodesics.}
#' \item{res}{}
Copy link
Member

@szhorvat szhorvat Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For nrgeo:

A vector in which each element is the number of shortest paths (geodesics) from from to the corresponding vertex in to.

#'
#' For `mean_distance()` a single number is returned if `details=FALSE`,
#' or a named list with two entries: `res` is the mean distance as a numeric
Expand Down
10 changes: 8 additions & 2 deletions man/distances.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading