spielwiese
Last change
on this file since 16055bd 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 | |
---|
12 | class CFRandom { |
---|
13 | public: |
---|
14 | virtual ~CFRandom() {} |
---|
15 | virtual CanonicalForm generate() const { return 0; } |
---|
16 | virtual CFRandom * clone() const { return new CFRandom(); } |
---|
17 | }; |
---|
18 | |
---|
19 | class GFRandom : public CFRandom |
---|
20 | { |
---|
21 | public: |
---|
22 | GFRandom() {}; |
---|
23 | ~GFRandom() {} |
---|
24 | CanonicalForm generate() const; |
---|
25 | CFRandom * clone() const; |
---|
26 | }; |
---|
27 | |
---|
28 | class FFRandom : public CFRandom |
---|
29 | { |
---|
30 | public: |
---|
31 | FFRandom() {} |
---|
32 | ~FFRandom() {} |
---|
33 | CanonicalForm generate() const; |
---|
34 | CFRandom * clone() const; |
---|
35 | }; |
---|
36 | |
---|
37 | class IntRandom : public CFRandom |
---|
38 | { |
---|
39 | private: |
---|
40 | int max; |
---|
41 | public: |
---|
42 | IntRandom(); |
---|
43 | IntRandom( int m ); |
---|
44 | ~IntRandom(); |
---|
45 | CanonicalForm generate() const; |
---|
46 | CFRandom * clone() const; |
---|
47 | }; |
---|
48 | |
---|
49 | class AlgExtRandomF : public CFRandom { |
---|
50 | private: |
---|
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 & ); |
---|
57 | public: |
---|
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 | |
---|
66 | class CFRandomFactory { |
---|
67 | public: |
---|
68 | static CFRandom * generate(); |
---|
69 | }; |
---|
70 | |
---|
71 | int factoryrandom( int n ); |
---|
72 | |
---|
73 | void factoryseed( int s ); |
---|
74 | |
---|
75 | /*ENDPUBLIC*/ |
---|
76 | |
---|
77 | #endif /* ! INCL_CF_RANDOM_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.