code: def integrate(self, function, lower_bound, upper_bound):
          
          ret = 0.0
          n = self.nsteps
          xStep = (float(upper_bound) - float(lower_bound)) / float(n)
          self.log_info("xStep" + str(xStep))
          x = lower_bound
          val1 = function(x)
          self.log_info("val1: " + str(val1))
          for i in range(n):
              x = (i + 1) * xStep + lower_bound
              self.log_info("x: " + str(x))
              val2 = function(x)
              self.log_info("val2: " + str(val2))
              ret += 0.5 * xStep * (val1 + val2)
              val1 = val2
          return ret
docs: Calculates the integral of the given one dimensional function
          in the interval from lower_bound to upper_bound, with the simplex integration method.