My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
factory
cf_random.h
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
/**
4
* @file cf_random.h
5
*
6
* generate random integers, random elements of finite fields
7
**/
8
9
#ifndef INCL_CF_RANDOM_H
10
#define INCL_CF_RANDOM_H
11
12
// #include "config.h"
13
14
#include "
canonicalform.h
"
15
16
/*BEGINPUBLIC*/
17
18
/**
19
* virtual class for random element generation
20
**/
21
class
CFRandom
{
22
public
:
23
virtual
~CFRandom
() {}
24
virtual
CanonicalForm
generate
()
const
{
return
0; }
25
virtual
CFRandom
*
clone
()
const
{
return
new
CFRandom
(); }
26
};
27
28
/**
29
* generate random elements in GF
30
**/
31
class
GFRandom
:
public
CFRandom
32
{
33
public
:
34
GFRandom
() {};
35
~GFRandom
() {}
36
CanonicalForm
generate
()
const
;
37
CFRandom
*
clone
()
const
;
38
};
39
40
/**
41
* generate random elements in F_p
42
**/
43
class
FFRandom
:
public
CFRandom
44
{
45
public
:
46
FFRandom
() {}
47
~FFRandom
() {}
48
CanonicalForm
generate
()
const
;
49
CFRandom
*
clone
()
const
;
50
};
51
52
/**
53
* generate random integers
54
**/
55
class
IntRandom
:
public
CFRandom
56
{
57
private
:
58
int
max
;
59
public
:
60
IntRandom
();
61
IntRandom
(
int
m
);
62
~IntRandom
();
63
CanonicalForm
generate
()
const
;
64
CFRandom
*
clone
()
const
;
65
};
66
67
/**
68
* generate random elements in F_p(alpha)
69
**/
70
class
AlgExtRandomF
:
public
CFRandom
{
71
private
:
72
Variable
algext
;
73
CFRandom
*
gen
;
74
int
n
;
75
AlgExtRandomF
();
76
AlgExtRandomF
(
const
Variable
&
v
,
CFRandom
*
g
,
int
nn );
77
AlgExtRandomF
&
operator=
(
const
AlgExtRandomF
& );
78
public
:
79
AlgExtRandomF
(
const
AlgExtRandomF
& );
80
AlgExtRandomF
(
const
Variable
&
v
);
81
AlgExtRandomF
(
const
Variable
& v1,
const
Variable
& v2 );
82
~AlgExtRandomF
();
83
CanonicalForm
generate
()
const
;
84
CFRandom
*
clone
()
const
;
85
};
86
87
class
CFRandomFactory
{
88
public
:
89
static
CFRandom
*
generate
();
90
};
91
92
/// random integers with abs less than n
93
int
factoryrandom
(
int
n );
94
95
/// random seed initializer
96
void
FACTORY_PUBLIC
factoryseed
(
int
s
);
97
98
/*ENDPUBLIC*/
99
100
#endif
/* ! INCL_CF_RANDOM_H */
canonicalform.h
Header for factory's main class CanonicalForm.
m
int m
Definition
cfEzgcd.cc:128
g
g
Definition
cfModGcd.cc:4098
factoryrandom
int factoryrandom(int n)
random integers with abs less than n
Definition
cf_random.cc:177
factoryseed
void FACTORY_PUBLIC factoryseed(int s)
random seed initializer
Definition
cf_random.cc:186
AlgExtRandomF::clone
CFRandom * clone() const
Definition
cf_random.cc:162
AlgExtRandomF::gen
CFRandom * gen
Definition
cf_random.h:73
AlgExtRandomF::algext
Variable algext
Definition
cf_random.h:72
AlgExtRandomF::~AlgExtRandomF
~AlgExtRandomF()
Definition
cf_random.cc:149
AlgExtRandomF::operator=
AlgExtRandomF & operator=(const AlgExtRandomF &)
Definition
cf_random.cc:120
AlgExtRandomF::n
int n
Definition
cf_random.h:74
AlgExtRandomF::AlgExtRandomF
AlgExtRandomF()
Definition
cf_random.cc:110
AlgExtRandomF::generate
CanonicalForm generate() const
Definition
cf_random.cc:154
CFRandomFactory
Definition
cf_random.h:87
CFRandomFactory::generate
static CFRandom * generate()
Definition
cf_random.cc:167
CFRandom
virtual class for random element generation
Definition
cf_random.h:21
CFRandom::clone
virtual CFRandom * clone() const
Definition
cf_random.h:25
CFRandom::generate
virtual CanonicalForm generate() const
Definition
cf_random.h:24
CFRandom::~CFRandom
virtual ~CFRandom()
Definition
cf_random.h:23
CanonicalForm
factory's main class
Definition
canonicalform.h:86
FFRandom::generate
CanonicalForm generate() const
Definition
cf_random.cc:65
FFRandom::clone
CFRandom * clone() const
Definition
cf_random.cc:70
FFRandom::FFRandom
FFRandom()
Definition
cf_random.h:46
FFRandom::~FFRandom
~FFRandom()
Definition
cf_random.h:47
GFRandom::clone
CFRandom * clone() const
Definition
cf_random.cc:82
GFRandom::~GFRandom
~GFRandom()
Definition
cf_random.h:35
GFRandom::generate
CanonicalForm generate() const
Definition
cf_random.cc:75
GFRandom::GFRandom
GFRandom()
Definition
cf_random.h:34
IntRandom::IntRandom
IntRandom()
Definition
cf_random.cc:88
IntRandom::max
int max
Definition
cf_random.h:58
IntRandom::generate
CanonicalForm generate() const
Definition
cf_random.cc:100
IntRandom::clone
CFRandom * clone() const
Definition
cf_random.cc:105
IntRandom::~IntRandom
~IntRandom()
Definition
cf_random.cc:98
Variable
factory's class for variables
Definition
factory.h:127
s
const CanonicalForm int s
Definition
facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition
facBivar.h:39
FACTORY_PUBLIC
#define FACTORY_PUBLIC
Definition
globaldefs.h:25
Generated on
for My Project by
doxygen 1.17.0
for
Singular