source: git/factory/cf_random.h @ b973c0

spielwiese
Last change on this file since b973c0 was b973c0, checked in by Jens Schmidt <schmidt@…>, 27 years ago
#include <config.h> added git-svn-id: file:///usr/local/Singular/svn/trunk@136 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2// $Id: cf_random.h,v 1.1 1997-04-07 16:10:58 schmidt Exp $
3
4#ifndef INCL_CF_RANDOM_H
5#define INCL_CF_RANDOM_H
6
7/*
8$Log: not supported by cvs2svn $
9Revision 1.0  1996/05/17 10:59:39  stobbe
10Initial revision
11
12*/
13
14#include <config.h>
15
16#include "canonicalform.h"
17
18/*BEGINPUBLIC*/
19
20class CFRandom {
21public:
22    virtual ~CFRandom() {}
23    virtual CanonicalForm generate() const { return 0; }
24    virtual CFRandom * clone() const { return new CFRandom(); }
25};
26
27class GFRandom : public CFRandom
28{
29public:
30    GFRandom() {};
31    ~GFRandom() {}
32    CanonicalForm generate() const;
33    CFRandom * clone() const;
34};
35
36class FFRandom : public CFRandom
37{
38public:
39    FFRandom() {}
40    ~FFRandom() {}
41    CanonicalForm generate() const;
42    CFRandom * clone() const;
43};
44
45class IntRandom : public CFRandom
46{
47private:
48    int max;
49public:
50    IntRandom();
51    IntRandom( int m );
52    ~IntRandom();
53    CanonicalForm generate() const;
54    CFRandom * clone() const;
55};
56
57class AlgExtRandomF : public CFRandom {
58private:
59    Variable algext;
60    CFRandom * gen;
61    int n;
62    AlgExtRandomF();
63    AlgExtRandomF( const AlgExtRandomF & );
64    AlgExtRandomF( const Variable & v, CFRandom * g, int nn );
65    AlgExtRandomF& operator= ( const AlgExtRandomF & );
66public:
67    AlgExtRandomF( const Variable & v );
68    AlgExtRandomF( const Variable & v1, const Variable & v2 );
69    ~AlgExtRandomF();
70    CanonicalForm generate() const;
71    CFRandom * clone() const;
72};
73
74class CFRandomFactory {
75public:
76    static CFRandom * generate();
77};
78
79/*ENDPUBLIC*/
80
81int factoryrandom( int n );
82
83void factoryseed( int s );
84
85
86#endif /* INCL_CF_RANDOM_H */
Note: See TracBrowser for help on using the repository browser.