|
|
|||
File indexing completed on 2026-09-27 09:20:26
0001 #ifndef _PhotosDebugRandom_included_ 0002 #define _PhotosDebugRandom_included_ 0003 /** 0004 * @class PhotosDebugRandom 0005 * 0006 * @brief Random generator for debugging purposes 0007 * 0008 * Random generator with ability to save and restore state, set custom 0009 * state and print current state. This class extends PhotosRandom class. 0010 * PhotosRandom is a static class, therefore this extension works 0011 * automatically for FORTRAN code without any changes. 0012 * Our random generator is the C++ follow-up of FORTRAN generator by 0013 * F. James DD-Report, November 1988. and G. Marsaglia and A. Zaman, 0014 * FSU-SCR-87-50, 0015 * 0016 * @author Tomasz Przedzinski 0017 * @date 28th June 2012 0018 */ 0019 0020 #include "PhotosRandom.h" 0021 0022 namespace Photospp 0023 { 0024 0025 class PhotosDebugRandom : PhotosRandom 0026 { 0027 public: 0028 /* Save current state */ 0029 static void saveState(); 0030 0031 /* Restore state from save */ 0032 static void restoreState(); 0033 0034 /* Set current state provided by user */ 0035 static void setState(int i, int j, double c, double list[97]); 0036 0037 /* Save state provided by user */ 0038 static void setSaveState(int i, int j, double c, double list[97]); 0039 0040 /* Print state in a form that can be easily copied into the code */ 0041 static void print(); 0042 0043 private: 0044 static int i97_saved; 0045 static int j97_saved; 0046 static double uran_saved[97]; 0047 static double cran_saved; 0048 }; 0049 0050 } // namespace Photospp 0051 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|