1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 """Base class for all complement methods"""
19 __revision__ = "$Id: Base.py,v 1.7 2010-10-29 19:24:41 rliebscher Exp $"
20
21 import fuzzy.Exception
22
24 """An own exception type for complements."""
25 pass
26
27
29 """Base class for all complement methods"""
30
32 """Initialize the complement instance"""
33 super(Base, self).__init__(*args, **keywords)
34
36 """Calculate the complement of the value.
37 @param value: the value to complement
38 @type value: float
39 @return: the complemented value
40 @rtype: float
41 """
42 raise NotImplementedError("don't use the abstract base class")
43
45 """Return representation of instance.
46
47 @return: representation of instance
48 @rtype: string
49 """
50 return "%s.%s()" % (self.__class__.__module__, self.__class__.__name__)
51