Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBveri.hxx

Go to the documentation of this file.
00001 #ifndef _CTBveri_HXX
00002 #define _CTBveri_HXX 1
00003 
00008 /*----------------------------------------------------------------------------*/
00009 /* C Tool Box: Designed and implemented by:                                   */
00010 /*    Walter F.J. Mueller   Gesellschaft fuer Schwerionenforschung (GSI)      */
00011 /*                          Planckstrasse 1, D-64291 Darmstadt, Germany       */
00012 /*                  Email:  W.F.J.Mueller@gsi.de                              */
00013 /*                  WWW:    http://www-kp3.gsi.de/www/kp3/people/mueller.html */
00014 /*------------------------------------------+---------------------------------*/
00015 
00016 class CTBveri {
00017   public:
00018   
00019     typedef bool (*pveriproc_t)(CTBveri&);
00020 
00021                     CTBveri();
00022                     ~CTBveri();
00023 
00024     void            Register(CTBint i_ind,
00025                              pveriproc_t p_vp, const char* c_text);
00026   
00027     int             Exec(int argc, char *argv[]);
00028 
00029     bool            Verbosity(int i_level) const;
00030 
00031     CTBuint32       RandomInt();
00032     double          Random();
00033 
00034     CTBint          RandomInt(CTBint i_high);
00035     CTBint          RandomInt(CTBint i_low, CTBint i_high);
00036     CTBint          RandomInt1X(CTBint i_low, CTBint i_high);
00037 
00038     double          Random(double d_low, double d_high);
00039 
00040     bool            RandomBool(double d_prob);
00041 
00042     void            RandomVector(CTBint i_ran[], CTBint i_size, CTBint i_high);
00043     void            RandomVector(CTBint i_ran[], CTBint i_size,
00044                                  CTBint i_low, CTBint i_high);
00045 
00046     void            RandomVector(bool b_ran[], CTBint i_size, double d_prob);
00047 
00048     void            RandomPermutation(CTBint i_perm[], CTBint i_size);
00049     
00050   private:
00051 
00052     void            RandomSeed(CTBuint32 i_seed);
00053 
00054   private:
00055 
00056     CTBint          mi_nalloc;              // allocated slots
00057     pveriproc_t*    mp_vp;                  // pointers to test procedures
00058     const char**    mc_text;                // descriptive texts
00059     bool*           mb_active;              // test active flag
00060     CTBuint32       mi_seed;                // random seed
00061     CTBuint32       mi_sx;                  // swb generator state x
00062     CTBuint32       mi_sy;                  // swb generator state y
00063     CTBuint32       mi_sz;                  // swb generator state z
00064     CTBuint32       mi_sc;                  // swb generator state carry
00065     CTBuint32       mi_sn;                  // congruential generator state
00066     int             mi_verbosity;           // verbosity level
00067 };
00068 
00069 
00070 #if !(defined(CTB__OutLine) || defined(CTBveri__OutLine))
00071 //#include "CTBveri.icc"
00072 #endif
00073 
00074 #endif

Generated at Fri Oct 24 18:11:30 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001