A multi-order matrix powers function would be very handy. The basic idea is to generalize the concept of adjacency matrix powers to a multi-order model.
For a first-order network with adjacency matrix $A$, the $k$-th power gives the number of different paths between all pairs of nodes. In a multi-order network with max. order $K$ and adjacency matrices $A_i$ we can generalize the matrix power to:
$A_1 \cdot A_2 \cdot ... \cdot ... A_K^{k-K}$
A multi-order matrix powers function would be very handy. The basic idea is to generalize the concept of adjacency matrix powers to a multi-order model.
For a first-order network with adjacency matrix$A$ , the $k$ -th power gives the number of different paths between all pairs of nodes. In a multi-order network with max. order $K$ and adjacency matrices $A_i$ we can generalize the matrix power to:
$A_1 \cdot A_2 \cdot ... \cdot ... A_K^{k-K}$