Description Usage Arguments Details Value
Generate a desired graph (with igraph
format) with corresponding adjacency matrix as an binary matrix. If (i,j) is one, it implies there exists an edge i -> j.
1 2 3 4 5 | gen_adj_mat(
n_nodes,
graph_type = c("bi", "rand", "sf", "sw", "tree"),
seed = NA
)
|
n_nodes |
positive integer scalar (larger than 1), the number of nodes of the desired graph. For the Bipartite graph, it should be even. |
graph_type |
character scalar, one of types of graphs in the simulation studies. See details below for more information. |
seed |
integer scalar, in order to reproduce the same graph. |
There are seven graph types in the simulation studies: "bi" for Bipartite graph, "sf" for Scale-Free graph, "sw" for Small-World, "tree" for the tree with two children, "rand" for random DAG, and "chain" for a Chain graph. Except "rand", all the other graphs generated based on R package igraph. The Random DAG is generated based on R package pcalg.
A_true |
an adjacency matrix of the |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.