Nothing
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Pijavski code in C++ is being called from R environment with multiple arguments
#' It then periodically calls a function in R
#' "//[[Rcpp::export]]" is needed to export the function to R environment
#' @param str input character vector
#' @exportPattern("^[[:alpha:]]+")
#' @useDynLib Pijavski
#' @importFrom Rcpp evalCpp
Pijavski <- function(fn, Lips, a, b, iter, prec, env) {
.Call('Pijavski_Pijavski', PACKAGE = 'Pijavski', fn, Lips, a, b, iter, prec, env)
}
Pijavski.example <-function() {
print("An example of using Pijavski function")
print("Define an objective function function")
print(" myfunc <- function(x,y) {")
print(" y <- x * x")
print(" return(y)")
print(" }")
print("Call Pijavski")
print(" output<-Pijavski(myfunc , 5, -2.0, 1.0, 1000, 10^-3, new.env(list(fn = myfunc )))")
print("print the output")
print(" output")
myfunc <- function(x,y){
y <- x * x
return(y)
}
output<-Pijavski(myfunc, 5, -2.0, 1.0, 1000, 10^-3, new.env(list(fn = myfunc)))
print(output)
print("the minimizer is")
output[[1]]
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.