#' Create a regular graph adjacency matrix
#'
#' @param N The size of the graph.
#' @param k the number of neighbours of each node
#' @return an adjacency matrix of class simnetr_matrix
#' @examples
#' gr <- regular_matrix(1000,5)
#' @export
regular_matrix <- function(N, k) {
stopifnot((N*k) %% 2 == 0)
degree <- rep(k, N)
network <- given_degree_matrix(N, degree)
}
#' Create a regular graph adjacency list
#'
#' @param N The size of the graph.
#' @param k the number of neighbours of each node
#' @return an adjacency matrix of class simnetr_list
#' @examples
#' gr <- regular_list(1000,5)
#' @export
regular_list <- function(N, k) {
stopifnot((N*k) %% 2 == 0)
degree <- rep(k, N)
network <- given_degree_list(N, degree)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.