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

kdecore

  • kdecore
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 "kdelibs_export.h"
22 
23 class KRandomSequencePrivate;
24 class TQGList;
39 class KDECORE_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

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |