def eval(self, xx, d=None): """Evaluate the capped rbf interpolant at the point xx :param xx: Point where to evaluate :return: Value of the capped rbf interpolant at x """ return self.model.eval(to_unit_box(xx, self.data))
def deriv(self, xx, d=None): """Evaluate the derivative of the rbf interpolant at x :param x: Data point :return: Derivative of the rbf interpolant at x """ return self.model.deriv(to_unit_box(xx, self.data))
def add_point(self, xx, fx): """Add a new function evaluation :param xx: Point to add :param fx: The function value of the point to add """ if self.nump >= self.fvalues.shape[0]: self.fvalues.resize(2*self.fvalues.shape[0], 1) self.fvalues[self.nump] = fx self.nump += 1 self.needs_update = True self.model.add_point(to_unit_box(xx, self.data), fx)