00001 #ifndef _CTBveri_HXX
00002 #define _CTBveri_HXX 1
00003
00008
00009
00010
00011
00012
00013
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;
00057 pveriproc_t* mp_vp;
00058 const char** mc_text;
00059 bool* mb_active;
00060 CTBuint32 mi_seed;
00061 CTBuint32 mi_sx;
00062 CTBuint32 mi_sy;
00063 CTBuint32 mi_sz;
00064 CTBuint32 mi_sc;
00065 CTBuint32 mi_sn;
00066 int mi_verbosity;
00067 };
00068
00069
00070 #if !(defined(CTB__OutLine) || defined(CTBveri__OutLine))
00071
00072 #endif
00073
00074 #endif