2 #include "PhotosDebugRandom.h"
9 int PhotosDebugRandom::i97_saved = 0;
10 int PhotosDebugRandom::j97_saved = 0;
11 double PhotosDebugRandom::uran_saved[97] = { 0 };
12 double PhotosDebugRandom::cran_saved = 0;
14 void PhotosDebugRandom::saveState()
20 for(
int i=0;i<97;i++) uran_saved[i]=uran[i];
23 void PhotosDebugRandom::restoreState()
29 for(
int i=0;i<97;i++) uran[i]=uran_saved[i];
32 void PhotosDebugRandom::setState(
int i,
int j,
double c,
double list[97])
37 for(
int i=0;i<97;i++) uran[i]=list[i];
40 void PhotosDebugRandom::setSaveState(
int i,
int j,
double c,
double list[97])
45 for(
int i=0;i<97;i++) uran_saved[i]=list[i];
48 void PhotosDebugRandom::print()
50 int coutPrec = cout.precision(18);
51 ios_base::fmtflags flags = cout.setf(ios_base::floatfield);
55 cout<<
"double uran_state[97] = { ";
56 for(
int i=0;i<96;i++) cout<<uran[i]<<
", ";
57 cout<<uran[96]<<
" };"<<endl<<endl;
58 cout<<
"PhotosDebugRandom::setState( "<<i97<<
", "<<j97<<
", "<<cran<<
", uran_state );"<<endl;
63 cout.precision(coutPrec);
static void RevertOutput()
static void RedirectOutput(void(*func)(), ostream &where=*out)