My Project
debian-1:4.1.1-p2+ds-4
factory
cf_reval.cc
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
#define MORE_ZEROES
4
5
6
#include "config.h"
7
8
9
#include "
cf_assert.h
"
10
11
#include "
cf_defs.h
"
12
#include "
cf_reval.h
"
13
14
15
REvaluation::REvaluation
(
const
REvaluation
& e ):
Evaluation
()
16
{
17
if
( e.
gen
== 0 )
18
gen
= 0;
19
else
20
gen
= e.
gen
->
clone
();
21
values
= e.
values
;
22
}
23
24
REvaluation::~REvaluation
()
25
{
26
if
(
gen
!= 0 )
27
delete
gen
;
28
}
29
30
REvaluation
&
31
REvaluation::operator=
(
const
REvaluation
& e )
32
{
33
if
(
this
!= &e ) {
34
if
(
gen
!=0)
35
delete
gen
;
36
values
= e.
values
;
37
if
( e.
gen
== 0 )
38
gen
= 0;
39
else
40
gen
= e.
gen
->
clone
();
41
}
42
return
*
this
;
43
}
44
45
void
46
REvaluation::nextpoint
()
47
{
48
int
n =
values
.
max
();
49
for
(
int
i
=
values
.
min
();
i
<= n;
i
++ )
50
values
[
i
] =
gen
->
generate
();
51
}
52
53
void
54
REvaluation::nextpoint
(
int
n)
55
{
56
int
m
=
values
.
max
();
57
int
t=
values
.
min
();
58
for
(
int
i
= t;
i
<=
m
;
i
++)
59
values
[
i
]= 0;
60
61
if
(
m
== t)
62
{
63
values
[t]=
gen
->
generate
();
64
return
;
65
}
66
for
(
int
i
= 0;
i
< n;
i
++)
67
{
68
int
l
=
factoryrandom
(
m
- t + 1) + t;
69
values
[
l
]=
gen
->
generate
();
70
}
71
}
Evaluation::values
CFArray values
Definition:
cf_eval.h:34
REvaluation::operator=
REvaluation & operator=(const REvaluation &e)
Definition:
cf_reval.cc:31
cf_reval.h
Evaluation
class to evaluate a polynomial at points
Definition:
cf_eval.h:31
Array::min
int min() const
Definition:
ftmpl_array.cc:98
i
int i
Definition:
cfEzgcd.cc:125
REvaluation::REvaluation
REvaluation()
Definition:
cf_reval.h:30
Array::max
int max() const
Definition:
ftmpl_array.cc:104
cf_defs.h
REvaluation
class to generate random evaluation points
Definition:
cf_reval.h:25
CFRandom::clone
virtual CFRandom * clone() const
Definition:
cf_random.h:25
CFRandom::generate
virtual CanonicalForm generate() const
Definition:
cf_random.h:24
REvaluation::~REvaluation
~REvaluation()
Definition:
cf_reval.cc:24
factoryrandom
int factoryrandom(int n)
random integers with abs less than n
Definition:
cf_random.cc:168
m
int m
Definition:
cfEzgcd.cc:121
REvaluation::gen
CFRandom * gen
Definition:
cf_reval.h:28
l
int l
Definition:
cfEzgcd.cc:93
cf_assert.h
REvaluation::nextpoint
void nextpoint()
Definition:
cf_reval.cc:46
Generated on Fri Jan 10 2020 08:17:41 for My Project by
doxygen 1.8.16
for
Singular debian-1:4.1.1-p2+ds-4