source: git/factory/cf_random.h @ 8a30b1

spielwiese
Last change on this file since 8a30b1 was 362fc67, checked in by Martin Lee <martinlee84@…>, 12 years ago
chg: remove $Id$
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2
3#ifndef INCL_CF_RANDOM_H
4#define INCL_CF_RANDOM_H
5
6// #include "config.h"
7
8#include "canonicalform.h"
9
10/*BEGINPUBLIC*/
11
12class CFRandom {
13public:
14    virtual ~CFRandom() {}
15    virtual CanonicalForm generate() const { return 0; }
16    virtual CFRandom * clone() const { return new CFRandom(); }
17};
18
19class GFRandom : public CFRandom
20{
21public:
22    GFRandom() {};
23    ~GFRandom() {}
24    CanonicalForm generate() const;
25    CFRandom * clone() const;
26};
27
28class FFRandom : public CFRandom
29{
30public:
31    FFRandom() {}
32    ~FFRandom() {}
33    CanonicalForm generate() const;
34    CFRandom * clone() const;
35};
36
37class IntRandom : public CFRandom
38{
39private:
40    int max;
41public:
42    IntRandom();
43    IntRandom( int m );
44    ~IntRandom();
45    CanonicalForm generate() const;
46    CFRandom * clone() const;
47};
48
49class AlgExtRandomF : public CFRandom {
50private:
51    Variable algext;
52    CFRandom * gen;
53    int n;
54    AlgExtRandomF();
55    AlgExtRandomF( const Variable & v, CFRandom * g, int nn );
56    AlgExtRandomF& operator= ( const AlgExtRandomF & );
57public:
58    AlgExtRandomF( const AlgExtRandomF & );
59    AlgExtRandomF( const Variable & v );
60    AlgExtRandomF( const Variable & v1, const Variable & v2 );
61    ~AlgExtRandomF();
62    CanonicalForm generate() const;
63    CFRandom * clone() const;
64};
65
66class CFRandomFactory {
67public:
68    static CFRandom * generate();
69};
70
71int factoryrandom( int n );
72
73void factoryseed( int s );
74
75/*ENDPUBLIC*/
76
77#endif /* ! INCL_CF_RANDOM_H */
Note: See TracBrowser for help on using the repository browser.