nocad.design.generate_matrices#

nocad.design.generate_matrices(adj, method='path_finding')[source]#

State-space matrices of a controllable and observable system on a network.

Parameters:
adjarray_like or sparse, shape (N, N)

Adjacency matrix; numeric weights are kept in \(\mathbf{A}=\mathbf{W}^{\mathsf T}\).

method{“path_finding”, “signal_sharing”, “minimum”, “matching”}
Returns:
A, B, C, Darrays (sparse if adj is sparse)

\(\mathbf{D}\) is a zero matrix of shape (K, M).

Examples

>>> A, B, C, D = generate_matrices([[0, 1, 0], [0, 0, 1], [0, 0, 0]])
>>> B.ravel(), C.ravel(), D.shape
(array([1., 0., 0.]), array([0., 0., 1.]), (1, 1))