Package fuzzy :: Package norm :: Module Norm :: Class Norm
[hide private]
[frames] | no frames]

Class Norm

source code


Abstract Base class of any fuzzy norm

Instance Methods [hide private]
 
__init__(self, type=0)
Initialize type of norm
source code
float
__call__(self, *args)
Calculate result of norm(arg1,arg2,...)
source code
 
getType(self)
Return type of norm: 0 = not defined or not classified 1 = t-norm ( = Norm.T_NORM) 2 = s-norm ( = Norm.S_NORM)
source code
(float,float)
checkArgs2(self, args)
Checks args to be 2 float values.
source code
list of float
checkArgsN(self, args)
Checks args to be at least 2 float values.
source code
string
__repr__(self)
Return representation of instance.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  UNKNOWN = 0
type of norm unknown
  T_NORM = 1
norm is t-norm
  S_NORM = 2
norm is s-norm
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, type=0)
(Constructor)

source code 

Initialize type of norm

Overrides: object.__init__

__call__(self, *args)
(Call operator)

source code 

Calculate result of norm(arg1,arg2,...)

Parameters:
  • args (list of float) - list of floats as arguments for norm.
Returns: float
result of norm calulation
Raises:
  • NormException - any problem in calculation (wrong number of arguments, numerical problems)

checkArgs2(self, args)

source code 

Checks args to be 2 float values.

Parameters:
  • args (list of float?) - list of arguments
Returns: (float,float)
first two args as float values

checkArgsN(self, args)

source code 

Checks args to be at least 2 float values.

Parameters:
  • args (list of float?) - list of arguments
Returns: list of float
arguments as float values

__repr__(self)
(Representation operator)

source code 

Return representation of instance.

Returns: string
representation of instance
Overrides: object.__repr__