|
36 | 36 | checkDimensions <- function(FUN, x, f0 = NULL, func = NULL, |
37 | 37 | elementwise = NA, vectorised = NA, multivalued = NA, |
38 | 38 | deriv.order = 1, acc.order = 2, side = 0, h = NULL, |
39 | | - zero.tol = sqrt(.Machine$double.eps), cores = 1, preschedule = TRUE, cl = NULL, ...) { |
| 39 | + zero.tol = NULL, cores = 1, preschedule = TRUE, cl = NULL, ...) { |
40 | 40 | if (missing(FUN)) { |
41 | 41 | if (is.function(func)) { |
42 | 42 | FUN <- func |
@@ -273,8 +273,8 @@ generateGrid <- function(x, h, stencils, elementwise, vectorised) { |
273 | 273 | #' \code{"DV"}, or \code{"SW"} to be used in [gradstep()]). The default value is |
274 | 274 | #' described in \code{?GenD}. |
275 | 275 | #' @param zero.tol Small positive integer: if \code{abs(x) >= zero.tol}, then, the automatically |
276 | | -#' guessed step size is relative (\code{x} multiplied by the step), unless an auto-selection |
277 | | -#' procedure is requested; otherwise, it is absolute. |
| 276 | +#' guessed step size is relative or near-relative (\code{x} multiplied by the step), |
| 277 | +#' unless an auto-selection procedure is requested; otherwise, it is absolute. |
278 | 278 | #' @param f0 Optional numeric: if provided, used to determine the vectorisation type |
279 | 279 | #' to save time. If FUN(x) must be evaluated (e.g. second derivatives), saves one evaluation. |
280 | 280 | #' @param h0 Numeric scalar of vector: initial step size for automatic search with |
@@ -368,7 +368,7 @@ generateGrid <- function(x, h, stencils, elementwise, vectorised) { |
368 | 368 | #' system.time(GenD(fslow, x, side = 1, acc.order = 2)) |
369 | 369 | GenD <- function(FUN, x, elementwise = NA, vectorised = NA, multivalued = NA, |
370 | 370 | deriv.order = 1L, side = 0, acc.order = 2L, stencil = NULL, |
371 | | - h = NULL, zero.tol = sqrt(.Machine$double.eps), h0 = NULL, control = list(), |
| 371 | + h = NULL, zero.tol = NULL, h0 = NULL, control = list(), |
372 | 372 | f0 = NULL, cores = 1, preschedule = TRUE, cl = NULL, |
373 | 373 | func = NULL, method = NULL, method.args = list(), ...) { |
374 | 374 | if (is.function(x) && !is.function(FUN)) { |
@@ -629,7 +629,7 @@ GenD <- function(FUN, x, elementwise = NA, vectorised = NA, multivalued = NA, |
629 | 629 | #' Grad(LReLU, seq(-1, 1, 0.1)) |
630 | 630 | Grad <- function(FUN, x, elementwise = NA, vectorised = NA, multivalued = NA, |
631 | 631 | deriv.order = 1L, side = 0, acc.order = 2, stencil = NULL, |
632 | | - h = NULL, zero.tol = sqrt(.Machine$double.eps), h0 = NULL, control = list(), |
| 632 | + h = NULL, zero.tol = NULL, h0 = NULL, control = list(), |
633 | 633 | f0 = NULL, cores = 1, preschedule = TRUE, cl = NULL, |
634 | 634 | func = NULL, method = NULL, method.args = list(), ...) { |
635 | 635 | if (is.function(x) && !is.function(FUN)) { |
@@ -714,7 +714,7 @@ Grad <- function(FUN, x, elementwise = NA, vectorised = NA, multivalued = NA, |
714 | 714 | #' @export |
715 | 715 | Jacobian <- function(FUN, x, elementwise = NA, vectorised = NA, multivalued = NA, |
716 | 716 | deriv.order = 1L, side = 0, acc.order = 2, stencil = NULL, |
717 | | - h = NULL, zero.tol = sqrt(.Machine$double.eps), h0 = NULL, |
| 717 | + h = NULL, zero.tol = NULL, h0 = NULL, |
718 | 718 | control = list(), f0 = NULL, |
719 | 719 | cores = 1, preschedule = TRUE, cl = NULL, |
720 | 720 | func = NULL, method = NULL, method.args = list(), ...) { |
|
0 commit comments