(self,xs)
return retval
Calculate the scoring function at an iterable of points.
    Returns a list of scalars, the evaluations at each point.

    Required argument:
    xs -- iterable, points at which to evaluate the scoring function.
Calculate the scoring function at an iterable of points.
    Returns a list of scalars, the evaluations at each point.
Calculate the scoring function at an iterable of points . Returns a list of scalars the evaluations at each point .
def calculate(self,xs):
    """
    Calculate the scoring function at an iterable of points.
    Returns a list of scalars, the evaluations at each point.

    Required argument:
    xs -- iterable, points at which to evaluate the scoring function.
    """
    retval = []
    for x in xs:
      # Bound value between sup and infs implied by point object cones
      xadj = np.array(x)/self.scale
      supval = min([p.find_sup(xadj) for p in self.point_objs])
      infval = max([p.find_inf(xadj) for p in self.point_objs])
      if self.maxval is not None:
        supval = min(supval,self.maxval)
        infval = min(infval,self.maxval)
      if self.minval is not None:
        supval = max(supval, self.minval)
        infval = max(infval, self.minval)
      # Value is halfway in-between these bounds
      retval.append((supval+infval)/2.0)
    return retval
def calculate ( self , xs ) : retval = [ ] for x in xs : # Bound value between sup and infs implied by point object cones xadj = np . array ( x ) / self . scale supval = min ( [ p . find_sup ( xadj ) for p in self . point_objs ] ) infval = max ( [ p . find_inf ( xadj ) for p in self . point_objs ] ) if self . maxval is not None : supval = min ( supval , self . maxval ) infval = min ( infval , self . maxval ) if self . minval is not None : supval = max ( supval , self . minval ) infval = max ( infval , self . minval ) # Value is halfway in-between these bounds retval . append ( ( supval + infval ) / 2.0 ) return retval