Beispiel #1
0
 def test_regauge_left_float(self):
     self.left, self.y, self.Ql, self.Rl = self.regaugeHelper('left', float)
     self.assertAlmostEqual(np.linalg.norm(
         cmf.transferOperator(self.Ql, self.Rl, 'l', np.eye(self.D))),
                            0.0,
                            places=self.places,
                            msg="regauge_left_float: regauging failed")
Beispiel #2
0
 def test_TMeigs_right_float(self):
     eta, v = self.TMeigsHelper('right', float)
     self.assertAlmostEqual(
         np.linalg.norm(
             cmf.transferOperator(self.Q, self.R, 'r', v) - eta * v),
         0.0,
         places=self.places,
         msg="TMeigs_left_complex: v is a bad eigenvector")
Beispiel #3
0
 def test_canonize_float(self):
     self.lam, self.Ql, self.Rl, self.Qr, self.Rr, rest = self.regaugeHelper(
         float)
     self.assertAlmostEqual(np.linalg.norm(
         cmf.transferOperator(self.Ql, self.Rl, 'l', np.eye(self.D))),
                            0.0,
                            places=self.places,
                            msg="canonize_float: regauging failed")
     self.assertAlmostEqual(np.linalg.norm(
         cmf.transferOperator(self.Qr, self.Rr, 'r', np.eye(self.D))),
                            0.0,
                            places=self.places,
                            msg="canonize_complex: regauging failed")
     self.assertAlmostEqual(np.linalg.norm(self.lam),
                            1.0,
                            places=12,
                            msg="canonize_complex: regauging failed")
Beispiel #4
0
 def test_regauge_right_float(self):
     self.right, self.x, self.Qr, self.Rr = self.regaugeHelper(
         'right', float)
     self.assertAlmostEqual(np.linalg.norm(
         cmf.transferOperator(self.Qr, self.Rr, 'r', np.eye(self.D))),
                            0.0,
                            places=self.places,
                            msg="regauge_right_float: regauging failed")