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: reorganize function reference #662

Merged
merged 58 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e5a1cb8
start titles improvements
maelle Feb 6, 2023
995c283
more of the same
maelle Feb 6, 2023
61a2adb
merging
maelle Feb 6, 2023
bb19420
more of the same
maelle Feb 6, 2023
22b4056
more reorg
maelle Feb 6, 2023
1d5addd
more reorg
maelle Feb 6, 2023
331e2c9
fix case
maelle Feb 6, 2023
3d85f97
undo automatic changes
maelle Feb 6, 2023
9ec21d5
rename family tag too
maelle Feb 6, 2023
814233d
regroup constructors
maelle Feb 6, 2023
9a59504
oops
maelle Feb 6, 2023
c155d64
more regrouping
maelle Feb 6, 2023
db8e05e
add authority_score() to centrality family
maelle Feb 6, 2023
f566e65
create topology title with isomorphism and automorphism as subtitles
maelle Feb 6, 2023
2c71a37
add more family tags in operators.R
maelle Feb 6, 2023
be0a104
add two functions to modifiers
maelle Feb 6, 2023
f660b1b
add missing family tag
maelle Feb 6, 2023
a0a4469
embedding family
maelle Feb 6, 2023
236337d
tweaks
maelle Feb 6, 2023
06cced4
add hub_score in centrality
maelle Feb 6, 2023
22a8294
no more "other"
maelle Feb 6, 2023
ea8a165
tweaks
maelle Feb 6, 2023
6819f35
tweaks
maelle Feb 6, 2023
01633bd
more tweaking
maelle Feb 6, 2023
9fad8c5
force a build here
maelle Feb 6, 2023
a70d980
place found for Adjacency matrices
maelle Feb 6, 2023
163dd55
conversion under utilities
maelle Feb 6, 2023
431667a
Env and data under utilities
maelle Feb 6, 2023
02162af
fit under utilities
maelle Feb 6, 2023
5c1e20b
clarify title
maelle Feb 6, 2023
f90f364
rm dup
maelle Feb 6, 2023
bbeba61
rm "other" section
maelle Feb 6, 2023
317fb24
consolidate printing
maelle Feb 6, 2023
03437f8
use feedback
maelle Feb 6, 2023
9c52e65
add 2 functions
maelle Feb 6, 2023
c878ec4
add triangles
maelle Feb 6, 2023
ea64fbd
move graph matching
maelle Feb 6, 2023
ed66dbc
Merge branch 'main' into reference-reorg
krlmlr Feb 7, 2023
bc98ede
rm man/roxygen
maelle Feb 16, 2023
973b5af
reorganization as explained in https://github.com/igraph/rigraph/pull…
maelle Feb 16, 2023
6e0a059
place games directly after deterministic constructors
maelle Feb 16, 2023
5896cd4
keep capitalization consistent
maelle Feb 16, 2023
091f374
rename section
maelle Feb 16, 2023
82aa2a3
abc order + srand
maelle Feb 16, 2023
a071a8a
more reorg
maelle Feb 16, 2023
ae1ab98
more reorg
maelle Feb 16, 2023
92ba547
more reorg
maelle Feb 16, 2023
699ce44
console() is fixed
maelle Feb 20, 2023
b252ebe
make internal actually internal :facepalm:
maelle Feb 20, 2023
e69fcf6
make layout.grid.3d internal
maelle Feb 20, 2023
ea2e9e2
Scan statistics as subsection of structural properties
maelle Feb 20, 2023
5a69c3b
edit
maelle Mar 6, 2023
5c2bf0d
last tweaks? :-)
maelle Mar 7, 2023
c0dd825
gitignored on main
maelle Mar 7, 2023
7b81269
Merge branch 'main' into reference-reorg
krlmlr Mar 7, 2023
a1d5281
fix conflicts
maelle Mar 13, 2023
48e88da
rm pr hack :-)
maelle Mar 13, 2023
2d25e9f
merge main
maelle Mar 13, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, config-draft]
branches: [main, master]
pull_request:
branches: [main, master]
release:
Expand Down
3 changes: 3 additions & 0 deletions R/aaa-auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,8 @@ count_triangles <- function(graph, vids=V(graph)) {
res
}

#' @family triangles
#' @rdname count_triangles
#' @export
triangles <- function(graph) {
# Argument checks
Expand Down Expand Up @@ -2143,6 +2145,7 @@ embed_adjacency_matrix <- function(graph, no, weights=NULL, which=c("lm", "la",
res
}

#' @family embedding
#' @export
embed_laplacian_matrix <- function(graph, no, weights=NULL, which=c("lm", "la", "sa"), type=c("default", "D-A", "DAD", "I-DAD", "OAP"), scaled=TRUE, options=igraph.arpack.default) {
# Argument checks
Expand Down
34 changes: 18 additions & 16 deletions R/attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#' @return A list of graph attributes, or a single graph attribute.
#'
#' @aliases get.graph.attribute graph.attributes
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -72,7 +72,7 @@ graph_attr <- function(graph, name) {
#' @return The graph, with the attribute(s) added.
#'
#' @aliases graph.attributes<-
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -102,7 +102,7 @@ graph_attr <- function(graph, name) {
#' @param value New value of the attribute.
#' @return The graph with the new graph attribute added or set.
#'
#' @family graph attributes
#' @family attributes
#' @aliases set.graph.attribute
#'
#' @export
Expand Down Expand Up @@ -152,7 +152,7 @@ graph.attributes <- function(graph) {
#' all vertex attributes, if `name` is missing.
#'
#' @aliases get.vertex.attribute vertex.attributes
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -197,7 +197,7 @@ vertex_attr <- function(graph, name, index = V(graph)) {
#' @return The graph, with the vertex attribute(s) added or set.
#'
#' @aliases vertex.attributes<-
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -229,7 +229,7 @@ vertex_attr <- function(graph, name, index = V(graph)) {
#' @return The graph, with the vertex attribute added or set.
#'
#' @aliases set.vertex.attribute
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -363,7 +363,7 @@ vertex.attributes <- function(graph, index = V(graph)) {
#' edge attributes if `name` is missing.
#'
#' @aliases get.edge.attribute edge.attributes
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -407,7 +407,7 @@ edge_attr <- function(graph, name, index = E(graph)) {
#' @return The graph, with the edge attribute(s) added or set.
#'
#' @aliases edge.attributes<-
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -439,7 +439,7 @@ edge_attr <- function(graph, name, index = E(graph)) {
#' @return The graph, with the edge attribute added or set.
#'
#' @aliases set.edge.attribute
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -567,7 +567,7 @@ edge.attributes <- function(graph, index = E(graph)) {
#' @return Character vector, the names of the graph attributes.
#'
#' @aliases list.graph.attributes attributes
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand All @@ -590,7 +590,7 @@ graph_attr_names <- function(graph) {
#' @return Character vector, the names of the vertex attributes.
#'
#' @aliases list.vertex.attributes
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand All @@ -617,7 +617,7 @@ vertex_attr_names <- function(graph) {
#' @return Character vector, the names of the edge attributes.
#'
#' @aliases list.edge.attributes
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand All @@ -643,7 +643,7 @@ edge_attr_names <- function(graph) {
#' @return The graph, with the specified attribute removed.
#'
#' @aliases remove.graph.attribute
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -673,7 +673,7 @@ delete_graph_attr <- function(graph, name) {
#' @return The graph, with the specified vertex attribute removed.
#'
#' @aliases remove.vertex.attribute
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -704,7 +704,7 @@ delete_vertex_attr <- function(graph, name) {
#' @return The graph, with the specified edge attribute removed.
#'
#' @aliases remove.edge.attribute
#' @family graph attributes
#' @family attributes
#'
#' @export
#' @examples
Expand Down Expand Up @@ -809,6 +809,7 @@ is_weighted <- function(graph) {
}

#' @rdname make_bipartite_graph
#' @family bipartite
#' @export
is_bipartite <- function(graph) {
if (!is_igraph(graph)) {
Expand Down Expand Up @@ -895,6 +896,7 @@ igraph.i.attribute.combination <- function(comb) {
#' new edge should be sum of the weights of the corresponding edges in the old
#' graph; and that the rest of the attributes should be ignored (=dropped).
#'
#' @family attributes
#' @name igraph-attribute-combination
#' @aliases attribute.combination
#' @section Predefined combination functions: The following combination
Expand Down Expand Up @@ -971,7 +973,7 @@ NULL
#' @method $ igraph
#' @name igraph-dollar
#' @export
#' @family graph attributes
#' @family attributes
#' @examples
#' g <- make_ring(10)
#' g$name
Expand Down
5 changes: 3 additions & 2 deletions R/centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ estimate_closeness <- function(graph, vids = V(graph), mode = c("out", "in", "al
}

#' @rdname arpack
#' @family centrality
#' @family arpack
#' @export
arpack_defaults <- list(
bmat = "I", n = 0, which = "XX", nev = 1, tol = 0.0,
Expand Down Expand Up @@ -497,7 +497,7 @@ arpack_defaults <- list(
#' which = "LM", maxiter = 2000
#' ))
#' }
#' @family centrality
#' @family arpack
#' @export
arpack <- function(func, extra = NULL, sym = FALSE, options = arpack_defaults,
env = parent.frame(), complex = !sym) {
Expand Down Expand Up @@ -909,6 +909,7 @@ diversity <- diversity
#' g2 <- make_ring(10)
#' hub_score(g2)$vector
#' authority_score(g2)$vector
#' @family centrality
hub_score <- hub_score


Expand Down
2 changes: 1 addition & 1 deletion R/community.R
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,6 @@ communities <- groups.communities
#' ## combined using the 'toString' function.
#' print(g2, g = TRUE, v = TRUE, e = TRUE)
#'
#' @family community
#' @export
#' @family functions for manipulating graph structure
contract <- contract
2 changes: 1 addition & 1 deletion R/decomposition.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#' linear-time algorithms to test chordality of graphs, test acyclicity of
#' hypergraphs, and selectively reduce acyclic hypergraphs. *SIAM Journal
#' of Computation* 13, 566--579.
#' @family decomposition
#' @family chordal
#' @export
#' @keywords graphs
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/embedding.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#' })
#' RDP <- sample_dot_product(lpvs)
#' embed <- embed_adjacency_matrix(RDP, 5)
#' @family embedding
#' @export
embed_adjacency_matrix <- embed_adjacency_matrix

Expand Down Expand Up @@ -148,6 +149,7 @@ embed_adjacency_matrix <- embed_adjacency_matrix
#' RDP.graph.3 <- sample_dot_product(lpvs.sph)
#' dim_select(embed_adjacency_matrix(RDP.graph.3, 10)$D)
#'
#' @family embedding
#' @export
dim_select <- dim_select

Expand Down
10 changes: 5 additions & 5 deletions R/epi.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
#
###################################################################

#' @family epi
#' @family processes
#' @export
time_bins <- function(x, middle = TRUE) {
UseMethod("time_bins")
}

#' @method time_bins sir
#' @rdname sir
#' @family epi
#' @family processes
#' @export
#' @importFrom stats IQR
time_bins.sir <- function(x, middle = TRUE) {
Expand All @@ -52,7 +52,7 @@ time_bins.sir <- function(x, middle = TRUE) {
#' @importFrom stats median
#' @method median sir
#' @rdname sir
#' @family epi
#' @family processes
#' @export
median.sir <- function(x, na.rm = FALSE, ...) {
sir <- x
Expand All @@ -73,7 +73,7 @@ median.sir <- function(x, na.rm = FALSE, ...) {
#' @importFrom stats quantile
#' @method quantile sir
#' @rdname sir
#' @family epi
#' @family processes
#' @export
quantile.sir <- function(x, comp = c("NI", "NS", "NR"), prob, ...) {
sir <- x
Expand Down Expand Up @@ -144,7 +144,7 @@ quantile.sir <- function(x, comp = c("NI", "NS", "NR"), prob, ...) {
#' @references Bailey, Norman T. J. (1975). The mathematical theory of
#' infectious diseases and its applications (2nd ed.). London: Griffin.
#' @method plot sir
#' @family epi
#' @family processes
#' @export
#' @importFrom graphics plot lines
#' @keywords graphs
Expand Down
8 changes: 4 additions & 4 deletions R/eulerian.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@
#' has_eulerian_cycle(g)
#' try(eulerian_cycle(g))
#'
#' @family eulerian
#' @family cycles
#' @export
has_eulerian_path <- function(graph) is_eulerian(graph)$has_path

#' @rdname has_eulerian_path
#' @family eulerian
#' @family cycles
#' @export
has_eulerian_cycle <- function(graph) is_eulerian(graph)$has_cycle

#' @rdname has_eulerian_path
#' @family eulerian
#' @family cycles
#' @export
eulerian_path <- eulerian_path

#' @rdname has_eulerian_path
#' @family eulerian
#' @family cycles
#' @export
eulerian_cycle <- eulerian_cycle
1 change: 1 addition & 0 deletions R/flow.R
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ dominator_tree <- function(graph, root, mode = c("out", "in", "all", "total")) {
#'
#' chvatal <- make_graph("chvatal")
#' min_st_separators(chvatal)
#' @family flow
min_st_separators <- min_st_separators


Expand Down
8 changes: 7 additions & 1 deletion R/games.R
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ gnm <- function(...) constructor_spec(sample_gnm, ...)
#' @family games
#' @export
#' @keywords graphs
#' @keywords internal
#' @examples
#'
#' g <- erdos.renyi.game(1000, 1 / 1000)
Expand Down Expand Up @@ -1069,8 +1070,8 @@ asym_pref <- function(...) constructor_spec(sample_asym_pref, ...)


#' @rdname ego
#' @family games
#' @export
#' @family functions for manipulating graph structure
connect <- function(graph, order, mode = c("all", "out", "in", "total")) {
if (!is_igraph(graph)) {
stop("Not a graph object")
Expand Down Expand Up @@ -1661,6 +1662,7 @@ sample_k_regular <- sample_k_regular
#' distribution in scale-free networks. *Phys Rev Lett* 87(27):278701,
#' 2001.
#' @keywords graphs
#' @family games
#' @examples
#'
#' N <- 10000
Expand Down Expand Up @@ -1727,6 +1729,7 @@ sample_fitness <- sample_fitness
#' Cho YS, Kim JS, Park J, Kahng B, Kim D: Percolation transitions in
#' scale-free networks under the Achlioptas process. *Phys Rev Lett*
#' 103:135702, 2009.
#' @family games
#' @keywords graphs
#' @examples
#'
Expand Down Expand Up @@ -1780,6 +1783,7 @@ sample_fitness_pl <- sample_fitness_pl
#' time: densification laws, shrinking diameters and possible explanations.
#' *KDD '05: Proceeding of the eleventh ACM SIGKDD international
#' conference on Knowledge discovery in data mining*, 177--187, 2005.
#' @family games
#' @keywords graphs
#' @examples
#'
Expand Down Expand Up @@ -1821,6 +1825,7 @@ sample_forestfire <- sample_forestfire
#' @references Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded
#' graph matching for correlated Erdos-Renyi graphs.
#' <https://arxiv.org/abs/1304.7844>
#' @family games
#' @examples
#' g <- sample_gnp(1000, .1)
#' g2 <- sample_correlated_gnp(g, corr = 0.5)
Expand Down Expand Up @@ -1857,6 +1862,7 @@ sample_correlated_gnp <- sample_correlated_gnp
#' graph matching for correlated Erdos-Renyi graphs.
#' <https://arxiv.org/abs/1304.7844>
#' @keywords graphs
#' @family games
#' @examples
#' gg <- sample_correlated_gnp_pair(
#' n = 10, corr = .8, p = .5,
Expand Down
3 changes: 2 additions & 1 deletion R/iterators.R
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ simple_es_index <- function(x, i, na_ok = FALSE) {
#'
#' @export
#' @family vertex and edge sequences
#' @family graph attributes
#' @family attributes
#' @examples
#' g <- make_(
#' ring(10),
Expand Down Expand Up @@ -1789,6 +1789,7 @@ rev.igraph.es <- rev.igraph.vs
#' V(g)$name <- letters[1:10]
#' as_ids(V(g))
#' as_ids(E(g))
#' @family vertex and edge sequences
as_ids <- function(seq) {
UseMethod("as_ids")
}
Expand Down
Loading