# Path: fuzzy/norm/Norm.py
# class Norm(object):
#     """Abstract Base class of any fuzzy norm"""
# 
#     # types of norm
#     UNKNOWN = 0 #: type of norm unknown
#     T_NORM = 1 #: norm is t-norm
#     S_NORM = 2 #: norm is s-norm
# 
#     def __init__(self,type=0):
#         """Initialize type of norm"""
#         self._type = type
# 
#     def __call__(self,*args):
#         """
#             Calculate result of norm(arg1,arg2,...)
#         
#             @param args: list of floats as arguments for norm.
#             @type args: list of float
#             @return: result of norm calulation
#             @rtype: float
#             @raise NormException: any problem in calculation (wrong number of arguments, numerical problems)
#         """
#         raise NormException("abstract class %s can't be called" % self.__class__.__name__)
# 
#     def getType(self):
#         """
#             Return type of norm:
#             0 = not defined or not classified
#             1 = t-norm ( = Norm.T_NORM)
#             2 = s-norm ( = Norm.S_NORM)
# 
#         """
#         return self._type
# 
# Path: fuzzy/utils.py
# def prop(func):
#     """Function decorator for defining property attributes
#   
#     The decorated function is expected to return a dictionary
#     containing one or more of the following pairs:
#       - fget - function for getting attribute value
#       - fset - function for setting attribute value
#       - fdel - function for deleting attribute
#     This can be conveniently constructed by the locals() builtin
#     function; see:
#     U{http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/205183}
#     """
#     return property(doc=func.__doc__, **func())


from fuzzy.norm.Norm import Norm
from fuzzy.utils import prop
        from fuzzy.utils import checkRange


class ParametricNorm(Norm):
    """Abstract base class for any parametric fuzzy norm
    
    @ivar p: parameter for norm
    @type p: float
    """
    _range = None

    def __init__(self,type,p):
        """Initialize type and parameter
        
        @param p: parameter for norm
        @type p: float
        """
        super(ParametricNorm,self).__init__(type)
        self.p = p

    @prop
    def p():
        """x
        @type: float"""
        def fget(self):
            return self._p
        def fset(self,value):
            self._checkParam(value)
            self._p = value
        return locals()


# Path: fuzzy/norm/Norm.py
# class Norm(object):
#     """Abstract Base class of any fuzzy norm"""
# 
#     # types of norm
#     UNKNOWN = 0 #: type of norm unknown
#     T_NORM = 1 #: norm is t-norm
#     S_NORM = 2 #: norm is s-norm
# 
#     def __init__(self,type=0):
#         """Initialize type of norm"""
#         self._type = type
# 
#     def __call__(self,*args):
#         """
#             Calculate result of norm(arg1,arg2,...)
#         
#             @param args: list of floats as arguments for norm.
#             @type args: list of float
#             @return: result of norm calulation
#             @rtype: float
#             @raise NormException: any problem in calculation (wrong number of arguments, numerical problems)
#         """
#         raise NormException("abstract class %s can't be called" % self.__class__.__name__)
# 
#     def getType(self):
#         """
#             Return type of norm:
#             0 = not defined or not classified
#             1 = t-norm ( = Norm.T_NORM)
#             2 = s-norm ( = Norm.S_NORM)
# 
#         """
#         return self._type
# 
# Path: fuzzy/utils.py
# def prop(func):
#     """Function decorator for defining property attributes
#   
#     The decorated function is expected to return a dictionary
#     containing one or more of the following pairs:
#       - fget - function for getting attribute value
#       - fset - function for setting attribute value
#       - fdel - function for deleting attribute
#     This can be conveniently constructed by the locals() builtin
#     function; see:
#     U{http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/205183}
#     """
#     return property(doc=func.__doc__, **func())


# Path: fuzzy/norm/ParametricNorm.py
from fuzzy.norm.Norm import Norm
from fuzzy.utils import prop
        from fuzzy.utils import checkRange



class ParametricNorm(Norm):
    """Abstract base class for any parametric fuzzy norm
    
    @ivar p: parameter for norm
    @type p: float
    """
    _range = None

    def __init__(self,type,p):
        """Initialize type and parameter
        
        @param p: parameter for norm
        @type p: float
        """
        super(ParametricNorm,self).__init__(type)
        self.p = p

    @prop
    def p():
        """x
        @type: float"""
        def fget(self):
            return self._p
        def fset(self,value):
            self._checkParam(value)
            self._p = value
        return locals()


    @prop