# Path: fuzzy/complement/Base.py
# class Base(object):
#     """Base class for all complement methods"""
# 
#     def __init__(self,*args,**keywords):
#         """Initialize the complement instance"""
#         super(Base, self).__init__(*args,**keywords)
# 
#     def __call__(self,value):
#         """Calculate the complement of the value.
#         @param value: the value to complement
#         @type value: float
#         @return: the complemented value
#         @rtype: float  
#         """
#         raise ComplementException("don't use the abstract base class")
# 
# 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.complement.Base import Base
from fuzzy.utils import prop
        from fuzzy.utils import checkRange


class Parametric(Base):
    """Abstract base class for any parametric fuzzy complement
    
    @ivar p: parameter for complement
    @type p: float
    """
    _range = None

    def __init__(self,p,*args,**keywords):
        """Initialize type and parameter
        
        @param p: parameter for complement
        @type p: float
        """
        super(Parametric,self).__init__(*args,**keywords)
        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/complement/Base.py
# class Base(object):
#     """Base class for all complement methods"""
# 
#     def __init__(self,*args,**keywords):
#         """Initialize the complement instance"""
#         super(Base, self).__init__(*args,**keywords)
# 
#     def __call__(self,value):
#         """Calculate the complement of the value.
#         @param value: the value to complement
#         @type value: float
#         @return: the complemented value
#         @rtype: float  
#         """
#         raise ComplementException("don't use the abstract base class")
# 
# 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/complement/Parametric.py
from fuzzy.complement.Base import Base
from fuzzy.utils import prop
        from fuzzy.utils import checkRange



class Parametric(Base):
    """Abstract base class for any parametric fuzzy complement
    
    @ivar p: parameter for complement
    @type p: float
    """
    _range = None

    def __init__(self,p,*args,**keywords):
        """Initialize type and parameter
        
        @param p: parameter for complement
        @type p: float
        """
        super(Parametric,self).__init__(*args,**keywords)
        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