Description Usage Arguments Details Value Examples
Returns the adjacency matrix of a chain, complete, or a lattice DAG.
1 |
m |
A positive integer, the dimension. |
mode |
One of |
nrows |
A positive integer that divides |
shuffle |
A logical, indicates whether the nodes |
seed |
A number, the seed passed to |
A chain graph has the form 1 -> 2 -> 3 -> ... -> m.
A star_out graph has and only has edges 1 -> i for all 1 < i <= m
.
A star_in graph has and only has edges i -> 1 for all 1 < i <= m
.
A tree graph has edges (i
A complete graph has an edge from i
to j
for any 1 <= i < j <= m
.
A lattice graph first places the nodes in a nrows x (m/nrows)
matrix, row by row. That is, the i
-th node is on the i %/% (m/nrows) + 1
-th row and the i %% (m/nrows)
-th column (or the (m/nrows)
-th column if i
divides it). Then add an edge between any two adjacent nodes, pointing from the left to the right or from the node above to the node below.
If shuffle == TRUE
, the rows/columns of the returning adjacency matrix are simultaneously shuffled.
The m x m
adjacency matrix of the DAG.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.