Example #1
0
 def radii(self, sys):
     # TODO: this also recomputes many subcalculations in l1_norm
     return np.squeeze(
         [l1_norm(sub, rtol=self.rtol, max_length=self.max_length)[0] for sub in decompose_states(sys)]
     )
Example #2
0
 def radii(self, sys):
     # TODO: this recomputes the same control_gram multiple times over
     return [2 * np.sum(hankel(sub)) for sub in decompose_states(sys)]
Example #3
0
def test_decompose_states(sys):
    assert np.dot(sys.C, decompose_states(sys)) + sys.D == sys