def test_trapezoidal_membership_function(self): self.assertRaises( TypeError, lambda: trapmf.trapmf(2.0, [-2.0, -0.5, 0.5, 2.5, 3.3]))
def test_trapezoidal_membership_function20(self): self.assertAlmostEqual(trapmf.trapmf(-0.1, [-4.0, -2.5, -1.5, -0.5]), 0.0, places=4)
def test_trapezoidal_membership_function48(self): self.assertAlmostEqual(trapmf.trapmf(6.0, [1.0, 3.0, 4.0, 5.5]), 0.0, places=4)
def test_trapezoidal_membership_function4(self): self.assertRaises(TypeError, lambda: trapmf.trapmf(2.0, []))
def test_trapezoidal_membership_function37(self): self.assertAlmostEqual(trapmf.trapmf(3.0, [-2.0, -0.5, 0.5, 2.5]), 0.0, places=4)
def test_trapezoidal_membership_function26(self): self.assertAlmostEqual(trapmf.trapmf(-0.7, [-2.0, -0.5, 0.5, 2.5]), 0.8667, places=4)
def test_trapezoidal_membership_function24(self): self.assertAlmostEqual(trapmf.trapmf(-1.8, [-2.0, -0.5, 0.5, 2.5]), 0.1333, places=4)