(self)
Check monotone relationships of points. Raises MonotoneError on failure.
Check monotone relationships of points. Raises MonotoneError on failure.
Check monotone relationships of points . Raises MonotoneError on failure .
def __check_monotonicity__(self):
    """ Check monotone relationships of points. Raises MonotoneError on failure. """
    for (x,v) in self.points.items():
      points_greater_than = filter(lambda point: x==point or self.__monotone_rel__(point,x)==1, self.points.keys())
      for gt in points_greater_than:
        if self.points[gt] < v:
          raise MonotoneError(np.array(gt)*self.scale,self.points[gt],np.array(x)*self.scale,v)
      points_less_than = filter(lambda point: x==point or self.__monotone_rel__(x,point)==1, self.points.keys())
      for lt in points_less_than:
        if self.points[lt] > v:
          raise MonotoneError(np.array(lt)*self.scale,self.points[lt],np.array(x)*self.scale,v)
def __check_monotonicity__ ( self ) : for ( x , v ) in self . points . items ( ) : points_greater_than = filter ( lambda point : x == point or self . __monotone_rel__ ( point , x ) == 1 , self . points . keys ( ) ) for gt in points_greater_than : if self . points [ gt ] < v : raise MonotoneError ( np . array ( gt ) * self . scale , self . points [ gt ] , np . array ( x ) * self . scale , v ) points_less_than = filter ( lambda point : x == point or self . __monotone_rel__ ( x , point ) == 1 , self . points . keys ( ) ) for lt in points_less_than : if self . points [ lt ] > v : raise MonotoneError ( np . array ( lt ) * self . scale , self . points [ lt ] , np . array ( x ) * self . scale , v )