1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 """General instance of an output variable."""
19 __revision__ = "$Id: OutputVariable.py,v 1.14 2010-03-28 18:38:08 rliebscher Exp $"
20
21 from fuzzy.Variable import Variable
22
24 """General instance of an output variable.
25 The defuzzification is provided by special object for this purpose,
26 set as defuzzify param.
27 Also marker, so you can check if any variable is an (instance of) output variable
28
29 @ivar defuzzify: Defuzzification method.
30 @type defuzzify: L{fuzzy.defuzzify.Base.Base}
31 """
32
33 - def __init__(self, defuzzify=None, *args, **keywords):
34 """Initialize this output variable with a defuzzification method.
35
36 @param defuzzify: Defuzzification method.
37 @type defuzzify: L{fuzzy.defuzzify.Base.Base}
38 """
39 super(OutputVariable, self).__init__(*args, **keywords)
40 self.defuzzify = defuzzify
41
45
47 """Helper for representation of instance.
48
49 Add all own params to given list in params.
50 """
51 params.append(repr(self.defuzzify))
52 super(OutputVariable, self)._repr_params(params)
53