Changeset 1976 in Sophya
- Timestamp:
- May 2, 2002, 12:22:25 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PMixer/extractRS.cc
r954 r1976 208 208 for(i=0;i<OutputMap.NbPixels();i++) 209 209 { 210 float r andom= frand01();211 if(r andom == 1) random= frand01();212 int r andomPix = random*OutputMap.NbPixels();213 int outpix = r andom*nbOfPix;210 float rndval = frand01(); 211 if(rndval == 1) rndval = frand01(); 212 int rndvalPix = rndval*OutputMap.NbPixels(); 213 int outpix = rndval*nbOfPix; 214 214 OutputMap(i) = outCoeff(outpix); 215 215 } … … 233 233 for(i=0;i<nb_source;i++) 234 234 { 235 float r andom= frand01();236 int outPix = r andom*OutputMap.NbPixels();235 float rndval = frand01(); 236 int outPix = rndval*OutputMap.NbPixels(); 237 237 SourceMap(outPix) = sourceCoeff(i); 238 238 OutputMap(outPix) = OutputMap(i)+ SourceMap(outPix);
Note:
See TracChangeset
for help on using the changeset viewer.