R/fastNewDual.r

Defines functions fastNewDual

template_dual <- new("dual", x = numeric(0), d = differential(list()) )
fastNewDual <- function(x, d) {
  z <- template_dual
  attributes(z) <- list(x = x, d = d, class = "dual");
  z
}

Try the salad package in your browser

Any scripts or data that you put into this service are public.

salad documentation built on April 4, 2025, 1:06 a.m.