6 Double_t Function(Double_t x)
11 Double_t Fun(Double_t x)
24 std::vector<Double_t> sv(3);
25 std::array<Int_t,3> a{ {1,2,3} };
46 ROOT::R::TRInterface &r=ROOT::R::TRInterface::Instance();
63 std::cout<<
"-----------Printing Results---------\n";
65 std::cout<<
"--------------------\n";
67 std::cout<<
"--------------------\n";
69 std::cout<<
"--------------------\n";
71 std::cout<<
"--------------------\n";
73 std::cout<<
"--------------------\n";
75 std::cout<<
"--------------------\n";
77 std::cout<<
"--------------------\n";
79 std::cout<<
"--------------------\n";
81 std::cout<<
"--------------------\n";
83 std::cout<<
"--------------------\n";
93 r[
"Function"]<<ROOT::R::TRFunctionExport(Function);
94 r<<
"print(Function(-1))";
96 r<<
"print(Function(1))";
98 r<<
"print('hello ')"<<std::string(
"print('world ')");
104 std::cout<<x<<std::endl;
107 std::cout<<x<<std::endl;
109 r<<
"mat<-matrix(c(1,2,3,4),nrow=2)";
131 std::cout<<
" array={"<<a[0]<<
","<<a[1]<<
","<<a[2]<<
"}";
134 std::cout<<
"func="<<Function(2);
137 r[
"funi"]<<(Int_t (*)(Int_t))Fun;
139 std::cout<<"funi="<<Fun(2)<<std::endl;
141 r["fund"]<<(Double_t (*)(Double_t))Fun;
142 r<<"print(fund(2.01))";
143 std::cout<<"fund="<<Fun(2.01)<<std::endl;