Skip to content

Commit

Permalink
Ensure valid edges in non-fuzzy cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezod committed Nov 23, 2010
1 parent a498903 commit e9c7ff7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test.py
Expand Up @@ -172,6 +172,9 @@ def test_mu(self):
self.assertEqual(self.T.mu(2.0), 0.5) self.assertEqual(self.T.mu(2.0), 0.5)
self.assertEqual(self.G.mu(12.0), 1.0) self.assertEqual(self.G.mu(12.0), 1.0)
self.assertEqual(self.G.mu(self.G.support[1] + 1.0), 0.0) self.assertEqual(self.G.mu(self.G.support[1] + 1.0), 0.0)
M = fuzz.TrapezoidalFuzzyNumber((1, 2), (1, 2))
self.assertEqual(M.mu(1), 1.0)
self.assertEqual(M.mu(2), 1.0)


def test_height(self): def test_height(self):
self.assertEqual(self.N.height, 1.0) self.assertEqual(self.N.height, 1.0)
Expand Down

0 comments on commit e9c7ff7

Please sign in to comment.