A.mult {streamDAG} | R Documentation |
Raise an adjacency matrix to some power
Description
When applying the definition of matrix multiplication to an adjacency matrix
\mathbf{A}
, the i,j
entry in \mathbf{A}^k
will give the number of paths in the graph from node i
to node j
of length k
.
Usage
A.mult(G, power, text.summary = TRUE)
Arguments
G |
Graph object of class |
power |
The power to rise the adjacency matrix to. |
text.summary |
Logical. If |
Value
Returns either a character vector of paths of a specified length or, if text.summary = TRUE
, the adjacency matrix raised to a specified power.
Author(s)
Ken Aho
Examples
kon_full <- streamDAGs("konza_full")
A.mult(kon_full, power = 6)
[Package streamDAG version 1.5 Index]