• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
krandomsequence.h
1 /* This file is part of the KDE libraries
2  Copyright (c) 1999 Sean Harmer <sh@astro.keele.ac.uk>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef K_RANDOM_SEQUENCE_H
19 #define K_RANDOM_SEQUENCE_H
20 
21 #include "tdelibs_export.h"
22 
23 class KRandomSequencePrivate;
24 class TQGList;
39 class TDECORE_EXPORT KRandomSequence
40 {
41 public:
55  KRandomSequence( long lngSeed = 0 );
56 
60  virtual ~KRandomSequence();
61 
65  KRandomSequence(const KRandomSequence &a);
66 
70  KRandomSequence &operator=(const KRandomSequence &a);
71 
78  void setSeed( long lngSeed = 0 );
79 
85  double getDouble();
86 
93  unsigned long getLong(unsigned long max);
94 
100  bool getBool();
101 
107  void randomize(TQGList *list);
108 
130  void modulate(int i);
131 
132 private:
133  void Draw(); // Generate the random number
134  long m_lngSeed1;
135  long m_lngSeed2;
136  long m_lngShufflePos;
137 
138  static const int m_nShuffleTableSize;
139  long *m_ShuffleArray;
140 
141  KRandomSequencePrivate *d;
142 };
143 
144 #endif
145 
KRandomSequence
A class to create a pseudo-random sequence.
Definition: krandomsequence.h:39

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.