search for: mtrand

Displaying 5 results from an estimated 5 matches for "mtrand".

Did you mean: strand
2009 May 12
4
different results on linux and windows
...R experts, we are preparing an R-package to compute the Oja Median which contains some C++ code in which random numbers are needed. To generate the random numbers we use the following Mersenne-Twister implementation: // MersenneTwister.h // Mersenne Twister random number generator -- a C++ class MTRand // Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus // Richard J. Wagner v1.0 15 May 2003 rjwagner at writeme.com the random seed for the Mersenne-Twister is provided by our R-function which gives an (random) integer to the C++ function srand() which in turn sets the seed i...
2009 Jun 10
1
[LLVMdev] problem when compiling to llvm bitcode
...llvm annealer_thread.cpp -c -o annealer_thread.o + llvm-g++ -emit-llvm rng.cpp -c -o rng.o + llc annealer_thread.o -f -o annealer_thread.s + llvm-g++ -c annealer_thread.s -o annealer_thread.o + llc rng.o -f -o rng.s + llvm-g++ -c rng.s -o rng.o + llvm-g++ annealer_thread.o rng.o rng.o: In function `MTRand::reload()': rng.s:(.text+0x50): multiple definition of `MTRand::reload()' annealer_thread.o:annealer_thread.s:(.text+0xa0): first defined here collect2: ld returned 1 exit status When I don't everything works: + llvm-g++ annealer_thread.cpp -c -o annealer_thread.o + llvm-g++ rng.cpp -c...
2012 May 07
0
R CMD check, interfacing c++ linking errors
...,i); int l = LENGTH(memberssxp); int* members = INTEGER(memberssxp); //bootstraps[i] = new int[l]; for(int j = 0; j<l;++j) { bootstraps[i][j] = members[j]; //Rprintf("id: %d\n",members[j]); } } double confnew = REAL(conf)[0]; int Nnode = LENGTH(VECTOR_ELT(bootClusters,0)); MTRand *R = new MTRand(long(443)); // Set random seed vector<bool> significantVec = vector<bool>(Nnode); findConfCore(treeMap,bootstraps,significantVec,confnew,R); vector<pair<int,int> > mergers; findConfModules(treeMap,bootstraps,significantVec,mergers,confnew); SEXP n...
2012 May 08
0
R CMD check, c++ source linking errors
...s,i); int l = LENGTH(memberssxp); int* members = INTEGER(memberssxp); //bootstraps[i] = new int[l]; for(int j = 0; j<l;++j) { bootstraps[i][j] = members[j]; //Rprintf("id: %d\n",members[j]); } } double confnew = REAL(conf)[0]; int Nnode = LENGTH(VECTOR_ELT(bootClusters,0)); MTRand *R = new MTRand(long(443)); // Set random seed vector<bool> significantVec = vector<bool>(Nnode); findConfCore(treeMap,bootstraps,significantVec,confnew,R); vector<pair<int,int> > mergers; findConfModules(treeMap,bootstraps,significantVec,mergers,confnew); SEXP n...
2012 May 08
1
R CMD check linking errors, when interfacing c++
...s,i); int l = LENGTH(memberssxp); int* members = INTEGER(memberssxp); //bootstraps[i] = new int[l]; for(int j = 0; j<l;++j) { bootstraps[i][j] = members[j]; //Rprintf("id: %d\n",members[j]); } } double confnew = REAL(conf)[0]; int Nnode = LENGTH(VECTOR_ELT(bootClusters,0)); MTRand *R = new MTRand(long(443)); // Set random seed vector<bool> significantVec = vector<bool>(Nnode); findConfCore(treeMap,bootstraps,significantVec,confnew,R); vector<pair<int,int> > mergers; findConfModules(treeMap,bootstraps,significantVec,mergers,confnew); SEXP n...