def METHOD_NAME(self, fun):
    """Evaluate cost function and compute intensity at this position"""
    self.evaluate(fun)
    if self.score == sys.float_info.max:
        self.intensity = -sys.float_info.max
    else:
        self.intensity = 1 / self.score