00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KDE__RANDOMSEQUENCE_H
00019 #define KDE__RANDOMSEQUENCE_H
00020
00021 #include <faith/tools.h>
00022 namespace Faith
00023 {
00024
00039 class FAITH_TOOLS_EXPORT RandomSequence
00040 {
00041 public:
00055 RandomSequence( long lngSeed = 0 );
00056
00060 virtual ~RandomSequence();
00061
00065 RandomSequence(const RandomSequence &a);
00066
00070 RandomSequence &operator=(const RandomSequence &a);
00071
00078 void setSeed( long lngSeed = 1 );
00079
00085 double getDouble();
00086
00093 unsigned long getLong(unsigned long max);
00094
00100 bool getBool();
00101
00102 #if 0
00103
00108 void randomize(QGList *list);
00109 #endif
00110
00132 void modulate(int i);
00133
00134 static int random();
00135
00136 private:
00137 void draw();
00138 long m_lngSeed1;
00139 long m_lngSeed2;
00140 long m_lngShufflePos;
00141
00142 static const int m_nShuffleTableSize;
00143 long *m_ShuffleArray;
00144
00145 struct Private;
00146 Private *d;
00147 };
00148
00149 }
00150
00151 #endif
00152