search for: rnmx

Displaying 1 result from an estimated 1 matches for "rnmx".

Did you mean: renmx
2011 May 30
0
2D random walk with traps convert C++ code to R code
...table() or sink() ) Thank you... #include <iostream> #include <math.h>#include <fstream.h>#include <time.h> #define IA 16807#define IM 2147483647#define AM (1.0/IM)#define IQ 127773 #define IR 2836#define NTAB 32#define NDIV (1+(IM-1)/NTAB)#define EPS 1.2*pow(10,-7)#define RNMX (1.0-EPS) using namespace std;float rand1(long *idum); int main(){ long run=10000,adr=-run,x,y,hapa=0,i=0; int dimx=700,dimy=700,nrg=50, M[dimx][dimy]; double rnd,sum=0; long k[run+1],frekuenca; bool njehsuar[run+1], next; ofstream Txt("EndjeMePengesa2D.txt"); printf("\nProgrami ek...