search for: angle_incr

Displaying 3 results from an estimated 3 matches for "angle_incr".

2017 Dec 03
5
Rcpp, dyn.load and C++ problems
...wever in R I can't see the function I have defined in C++. I have read some web-pages about Rcpp and C++ but it is a bit confusion for me. Anyway, This is the C++-code: #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] List compute_values_cpp(int totalPoints = 1e5, double angle_increment = 0.01, int radius = 400, double grow = 3.64) { double xn = 0.5; double angle = 0.1; double xn_plus_one, yn_plus_one; NumericVector x(totalPoints); NumericVector y(totalPoints); for (int i=0; i<totalPoints; i++) { xn_plus_one = xn*cos(angle)*radius; yn_plus_one = xn*sin...
2017 Dec 03
0
Rcpp, dyn.load and C++ problems
...ed in C++. > I have read some web-pages about Rcpp and C++ but it is a bit confusion > for me. > > Anyway, > This is the C++-code: > > #include <Rcpp.h> > using namespace Rcpp; > > // [[Rcpp::export]] > List compute_values_cpp(int totalPoints = 1e5, double angle_increment = > 0.01, int radius = 400, double grow = 3.64) { > double xn = 0.5; > double angle = 0.1; > double xn_plus_one, yn_plus_one; > NumericVector x(totalPoints); > NumericVector y(totalPoints); > > for (int i=0; i<totalPoints; i++) { > xn_plus_one = xn...
2017 Dec 03
0
Rcpp, dyn.load and C++ problems
...... R> _One call_ of sourceCpp() compiles AND links AND loads AND runs the example R code (which is optional). For reference, the current mmsp.cpp follows. Dirk #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] List compute_values_cpp(int totalPoints = 1e5, double angle_increment = 0.01, int radius = 400, double grow = 3.64) { double xn = 0.5; double angle = 0.1; double xn_plus_one, yn_plus_one; NumericVector x(totalPoints); NumericVector y(totalPoints); for (int i=0; i<totalPoints; i++) { xn_plus_one = xn*cos(angle)*radius; yn_plus_one = xn*sin...