def __call__(self, rho=None, k=None, N=None, norm=True):
        """Call the criteria function correspondign to :attr:`name`."""
        self.__norm = norm
        if N is not None:
            self.N = N

        # we update rho only if it is needed (input different from self.rho)
        # if such case, we also update k
        if rho is not None:
            self.rho = rho
        if k is not None:
            self.__k = k
        self.__norm = norm
        #used to check if the criteria is reached or not

        f = eval(self.name)
        self.data = f(self.N, self.rho, self.k)
        # compare the new data with the previous one and return
        # False if the new value is larger so as to stop the iteration
        if self.old_data is not None and self.data is not None:
            if self.data > self.old_data:
                return False
            else:
                return True
        return True
def __call__ ( self , rho = None , k = None , N = None , norm = True ) : self . __norm = norm if N is not None : self . N = N if rho is not None : self . rho = rho if k is not None : self . __k = k self . __norm = norm f = eval ( self . name ) self . data = f ( self . N , self . rho , self . k ) if self . old_data is not None and self . data is not None : if self . data > self . old_data : return False else : return True return True
Call the criteria function correspondign to :attr:`name`.