22   return 100*tmp1*tmp1+tmp2*tmp2;
 
   30   grad[0]=-400 * 
x * (
y - 
x * 
x) - 2 * (1 - 
x);
 
   31   grad[1]=200 * (
y - 
x * 
x);
 
   49   r.Execute(
"result <- optim( c(0.01,0.01), RosenBrock,method='BFGS',control = list(maxit = 1000000) )");
 
   55   std::cout.precision(8);
 
   57   std::cout<<
"-----------------------------------------"<<std::endl;
 
   58   std::cout<<
"Minimum x="<<min[0]<<
" y="<<min[1]<<std::endl;
 
   59   std::cout<<
"Value at minimum ="<<RosenBrock(min)<<std::endl;
 
   62   r.Execute(
"optimHess(result$par, RosenBrock, RosenBrockGrad)");
 
   63   r.Execute(
"hresult <- optim(c(-1.2,1), RosenBrock, NULL, method = 'BFGS', hessian = TRUE)");
 
   68   std::cout<<
"-----------------------------------------"<<std::endl;
 
   69   std::cout<<
"Minimization with the Gradient"<<std::endl;
 
   70   std::cout<<
"Minimum x="<<
hmin[0]<<
" y="<<
hmin[1]<<std::endl;
 
   71   std::cout<<
"Value at minimum ="<<RosenBrock(
hmin)<<std::endl;
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmin
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
This is a class to pass functions from ROOT to R.
 
ROOT R was implemented using the R Project library and the modules Rcpp and RInside
 
static TRInterface & Instance()
static method to get an TRInterface instance reference