search for: d_x

Displaying 4 results from an estimated 4 matches for "d_x".

Did you mean: _x
2017 Nov 09
2
R-help
...ius r = 0:1 centred at her parent, under the periodic boundary conditions (i.e. the square = a torus). My attempt so far is: set.seed(1) library(spatstat) n_parent <- 2 n_daughter <- 4 r = 0.1 cnt <- n W <- disc(radius=3, centre=c(0,0)) i <- 1 while(i <= n_daughter){ d_x <- runif(1) d_y <- runif(1) if (d_x ^2+d_y^2 <r) { i = i+1}} #need a condition here such that (d_x,d_y) lies in B(0,r) #where B(0,r) is a ball of center origin and of radius r In above we should obtain one ball with n_daughters. Next step is to generate parent centers and distribu...
2017 Nov 09
0
R-help
...e = a torus). > > > My attempt so far is: > > > set.seed(1) library(spatstat) > > n_parent <- 2 > > n_daughter <- 4 > > r = 0.1 > > cnt <- n > > W <- disc(radius=3, centre=c(0,0)) i <- 1 > > while(i <= n_daughter){ > > d_x <- runif(1) > > d_y <- runif(1) > > if (d_x ^2+d_y^2 <r) { > > i = i+1}} > > > #need a condition here such that (d_x,d_y) lies in B(0,r) > > #where B(0,r) is a ball of center origin and of radius r > > In above we should obtain one ball with n_daugh...
2010 Sep 10
2
[xts, quantmod] segfault probelm when I work with memcpy function
...EXP r; PROTECT(r=allocVector(REALSXP,nr)); memcpy(&REAL(r)[0],&REAL(x)[0],nr*sizeof(double)); UNPROTECT(1); return(r); } SEXP open2(SEXP x) { int P=0; if (TYPEOF(x) != REALSXP) { PROTECT(x = coerceVector(x,REALSXP)); P++; } double *d_x = REAL(x); int nr = nrows(x); SEXP s; PROTECT(s = allocVector(REALSXP,nr)); P++; double *d_s = REAL(s); int i; for (i=0;i<nr;i++) d_s[i] = d_x[i]; UNPROTECT(P); return(s); } We starts R session again and: > # we hav...
2009 Jul 23
1
[PATCH server] changes required for fedora rawhide inclusion.
...dOT&0Iz28487{4w51klpIfL>VIE9H8A)CH&3LD$Px z<K_>ddyGZ>Cv%dJSBg&_G-3Z#djK06M{S8*#<k01AR&05%FwE*S9|Y~l%N#-g~Au& zSOG3s89aWPb%^7aL6lCj<PBCcm$rP8{EDL at 6`zPQI_YmpRR#Z1!TzyZuA`?}$DZ7= zv}01m0J|_6dO!ykls=Q}zvKK#C=-8X$J2$UGzn`Xhk~-&qYOfFb_BrZ`cImayc?WP zhB1kN at Lvd_XI(}gNEInZ_|7T2pd)vMX7ngfpBRId(1Xh{iN#N(?B%4g(Jqjsfs~Fe zmhR(n%gHgPfG556dx;4`K&mBi$C-w6QHNv*5n>k(Y~I1GSD_g at GCO&Q9T;b;WWcQ! z%}t5ogFf98_mW?K{8N*o>wOsvp~Z at R2USyd6HwQ)Q*r{8m^-?RbKgmL(TI!AQO6ur z`z~Gn5;ov7dZnqWAi at IBvwcl=DttxDx^I30aNyGR9`4nW&kp&N at p@5)GwH<*P0D%8 z*G7cfs...