Package fuzzy :: Package fuzzify :: Module Base
[hide private]
[frames] | no frames]

Source Code for Module fuzzy.fuzzify.Base

 1  # -*- coding: utf-8 -*- 
 2  # 
 3  # Copyright (C) 2009  Rene Liebscher 
 4  # 
 5  # This program is free software; you can redistribute it and/or modify it under 
 6  # the terms of the GNU Lesser General Public License as published by the Free  
 7  # Software Foundation; either version 3 of the License, or (at your option) any 
 8  # later version. 
 9  # 
10  # This program is distributed in the hope that it will be useful, but WITHOUT  
11  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
12  # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 
13  # details. 
14  #  
15  # You should have received a copy of the GNU Lesser General Public License 
16  # along with this program; if not, see <http://www.gnu.org/licenses/>.  
17  # 
18   
19  """base class for all fuzzification methods""" 
20   
21  __revision__ = "$Id: Base.py,v 1.7 2010-10-29 19:24:41 rliebscher Exp $" 
22   
23   
24 -class Base(object): # pylint: disable=R0903
25 """base class for all fuzzification methods""" 26
27 - def __init__(self, *args, **keywords):
28 super(Base, self).__init__(*args, **keywords)
29
30 - def setValue(self, variable, value):
31 """Set value to adjectives of variable. 32 33 @param variable: variable which adjective to set 34 @type variable: L{fuzzy.Variable.Variable} 35 @param variable: value to set the adjectives 36 @type: any 37 """ 38 raise NotImplementedError()
39
40 - def __repr__(self):
41 """Return representation of instance. 42 43 @return: representation of instance 44 @rtype: string 45 """ 46 return "%s.%s()" % (self.__class__.__module__, self.__class__.__name__)
47