My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
factory
cf_generator.h
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
/**
4
* @file cf_generator.h
5
*
6
* generate integers, elements of finite fields
7
**/
8
9
#ifndef INCL_CF_GENERATOR_H
10
#define INCL_CF_GENERATOR_H
11
12
// #include "config.h"
13
14
#include "
canonicalform.h
"
15
16
/*BEGINPUBLIC*/
17
18
/**
19
* virtual class for generators
20
**/
21
class
CFGenerator
22
{
23
public
:
24
CFGenerator
() {}
25
virtual
~CFGenerator
() {}
26
virtual
bool
hasItems
()
const
{
return
false
; }
27
virtual
void
reset
() {};
28
virtual
CanonicalForm
item
()
const
{
return
0; }
29
virtual
void
next
() {};
30
virtual
CFGenerator
*
clone
()
const
{
return
new
CFGenerator
();}
31
};
32
33
/**
34
* generate integers starting from 0
35
**/
36
class
IntGenerator
:
public
CFGenerator
37
{
38
private
:
39
int
current
;
40
public
:
41
IntGenerator
() :
current
(0) {}
42
~IntGenerator
() {}
43
bool
hasItems
()
const
;
44
void
reset
() {
current
= 0; }
45
CanonicalForm
item
()
const
;
46
void
next
();
47
void
operator++
() {
next
(); }
48
void
operator++
(
int
) {
next
(); }
49
CFGenerator
*
clone
()
const
;
50
};
51
52
/**
53
* generate all elements in F_p starting from 0
54
**/
55
class
FFGenerator
:
public
CFGenerator
56
{
57
private
:
58
int
current
;
59
public
:
60
FFGenerator
() :
current
(0) {}
61
~FFGenerator
() {}
62
bool
hasItems
()
const
;
63
void
reset
() {
current
= 0; }
64
CanonicalForm
item
()
const
;
65
void
next
();
66
void
operator++
() {
next
(); }
67
void
operator++
(
int
) {
next
(); }
68
CFGenerator
*
clone
()
const
;
69
};
70
71
/**
72
* generate all elements in GF starting from 0
73
**/
74
class
GFGenerator
:
public
CFGenerator
75
{
76
private
:
77
int
current
;
78
public
:
79
GFGenerator
();
80
~GFGenerator
() {}
81
bool
hasItems
()
const
;
82
void
reset
();
83
CanonicalForm
item
()
const
;
84
void
next
();
85
void
operator++
() {
next
(); }
86
void
operator++
(
int
) {
next
(); }
87
CFGenerator
*
clone
()
const
;
88
};
89
90
/**
91
* generate all elements in F_p(alpha) starting from 0
92
**/
93
class
AlgExtGenerator
:
public
CFGenerator
94
{
95
private
:
96
Variable
algext
;
97
FFGenerator
**
gensf
;
98
GFGenerator
**
gensg
;
99
int
n
;
100
bool
nomoreitems
;
101
AlgExtGenerator
();
102
AlgExtGenerator
(
const
AlgExtGenerator
& );
103
AlgExtGenerator
&
operator=
(
const
AlgExtGenerator
& );
104
public
:
105
AlgExtGenerator
(
const
Variable
& a );
106
~AlgExtGenerator
();
107
108
bool
hasItems
()
const
{
return
!
nomoreitems
; }
109
void
reset
();
110
CanonicalForm
item
()
const
;
111
void
next
();
112
void
operator++
() {
next
(); }
113
void
operator++
(
int
) {
next
(); }
114
CFGenerator
*
clone
()
const
;
115
};
116
117
class
CFGenFactory
118
{
119
public
:
120
static
CFGenerator
*
generate
();
121
};
122
123
/*ENDPUBLIC*/
124
125
#endif
/* ! INCL_CF_GENERATOR_H */
canonicalform.h
Header for factory's main class CanonicalForm.
AlgExtGenerator::gensf
FFGenerator ** gensf
Definition
cf_generator.h:97
AlgExtGenerator::operator++
void operator++()
Definition
cf_generator.h:112
AlgExtGenerator::n
int n
Definition
cf_generator.h:99
AlgExtGenerator::reset
void reset()
Definition
cf_generator.cc:147
AlgExtGenerator::gensg
GFGenerator ** gensg
Definition
cf_generator.h:98
AlgExtGenerator::item
CanonicalForm item() const
Definition
cf_generator.cc:162
AlgExtGenerator::clone
CFGenerator * clone() const
Definition
cf_generator.cc:216
AlgExtGenerator::hasItems
bool hasItems() const
Definition
cf_generator.h:108
AlgExtGenerator::nomoreitems
bool nomoreitems
Definition
cf_generator.h:100
AlgExtGenerator::AlgExtGenerator
AlgExtGenerator()
Definition
cf_generator.cc:94
AlgExtGenerator::~AlgExtGenerator
~AlgExtGenerator()
Definition
cf_generator.cc:131
AlgExtGenerator::operator=
AlgExtGenerator & operator=(const AlgExtGenerator &)
Definition
cf_generator.cc:104
AlgExtGenerator::next
void next()
Definition
cf_generator.cc:179
AlgExtGenerator::algext
Variable algext
Definition
cf_generator.h:96
CFGenFactory
Definition
cf_generator.h:118
CFGenFactory::generate
static CFGenerator * generate()
Definition
cf_generator.cc:221
CFGenerator
virtual class for generators
Definition
cf_generator.h:22
CFGenerator::CFGenerator
CFGenerator()
Definition
cf_generator.h:24
CFGenerator::clone
virtual CFGenerator * clone() const
Definition
cf_generator.h:30
CFGenerator::item
virtual CanonicalForm item() const
Definition
cf_generator.h:28
CFGenerator::~CFGenerator
virtual ~CFGenerator()
Definition
cf_generator.h:25
CFGenerator::hasItems
virtual bool hasItems() const
Definition
cf_generator.h:26
CFGenerator::next
virtual void next()
Definition
cf_generator.h:29
CFGenerator::reset
virtual void reset()
Definition
cf_generator.h:27
CanonicalForm
factory's main class
Definition
canonicalform.h:86
FFGenerator
generate all elements in F_p starting from 0
Definition
cf_generator.h:56
FFGenerator::current
int current
Definition
cf_generator.h:58
FFGenerator::FFGenerator
FFGenerator()
Definition
cf_generator.h:60
FFGenerator::operator++
void operator++()
Definition
cf_generator.h:66
FFGenerator::~FFGenerator
~FFGenerator()
Definition
cf_generator.h:61
FFGenerator::hasItems
bool hasItems() const
Definition
cf_generator.cc:35
FFGenerator::reset
void reset()
Definition
cf_generator.h:63
FFGenerator::item
CanonicalForm item() const
Definition
cf_generator.cc:40
FFGenerator::clone
CFGenerator * clone() const
Definition
cf_generator.cc:52
FFGenerator::next
void next()
Definition
cf_generator.cc:46
GFGenerator
generate all elements in GF starting from 0
Definition
cf_generator.h:75
GFGenerator::hasItems
bool hasItems() const
Definition
cf_generator.cc:62
GFGenerator::item
CanonicalForm item() const
Definition
cf_generator.cc:72
GFGenerator::next
void next()
Definition
cf_generator.cc:78
GFGenerator::clone
CFGenerator * clone() const
Definition
cf_generator.cc:89
GFGenerator::current
int current
Definition
cf_generator.h:77
GFGenerator::GFGenerator
GFGenerator()
Definition
cf_generator.cc:57
GFGenerator::operator++
void operator++()
Definition
cf_generator.h:85
GFGenerator::~GFGenerator
~GFGenerator()
Definition
cf_generator.h:80
GFGenerator::reset
void reset()
Definition
cf_generator.cc:67
IntGenerator::clone
CFGenerator * clone() const
Definition
cf_generator.cc:30
IntGenerator::~IntGenerator
~IntGenerator()
Definition
cf_generator.h:42
IntGenerator::operator++
void operator++()
Definition
cf_generator.h:47
IntGenerator::reset
void reset()
Definition
cf_generator.h:44
IntGenerator::item
CanonicalForm item() const
Definition
cf_generator.cc:20
IntGenerator::next
void next()
Definition
cf_generator.cc:25
IntGenerator::current
int current
Definition
cf_generator.h:39
IntGenerator::hasItems
bool hasItems() const
Definition
cf_generator.cc:15
IntGenerator::IntGenerator
IntGenerator()
Definition
cf_generator.h:41
Variable
factory's class for variables
Definition
factory.h:127
Generated on
for My Project by
doxygen 1.17.0
for
Singular