My Project
Loading...
Searching...
No Matches
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**/
22{
23public:
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**/
37{
38private:
40public:
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**/
56{
57private:
59public:
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**/
75{
76private:
78public:
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**/
94{
95private:
99 int n;
104public:
105 AlgExtGenerator( const Variable & a );
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
118{
119public:
120 static CFGenerator* generate();
121};
122
123/*ENDPUBLIC*/
124
125#endif /* ! INCL_CF_GENERATOR_H */
Header for factory's main class CanonicalForm.
generate all elements in F_p(alpha) starting from 0
Definition: cf_generator.h:94
FFGenerator ** gensf
Definition: cf_generator.h:97
CanonicalForm item() const
CFGenerator * clone() const
GFGenerator ** gensg
Definition: cf_generator.h:98
bool hasItems() const
Definition: cf_generator.h:108
AlgExtGenerator & operator=(const AlgExtGenerator &)
Variable algext
Definition: cf_generator.h:96
static CFGenerator * generate()
virtual class for generators
Definition: cf_generator.h:22
virtual CFGenerator * clone() const
Definition: cf_generator.h:30
virtual CanonicalForm item() const
Definition: cf_generator.h:28
virtual ~CFGenerator()
Definition: cf_generator.h:25
virtual bool hasItems() const
Definition: cf_generator.h:26
virtual void next()
Definition: cf_generator.h:29
virtual void reset()
Definition: cf_generator.h:27
factory's main class
Definition: canonicalform.h:86
generate all elements in F_p starting from 0
Definition: cf_generator.h:56
void operator++()
Definition: cf_generator.h:66
bool hasItems() const
Definition: cf_generator.cc:35
void reset()
Definition: cf_generator.h:63
CanonicalForm item() const
Definition: cf_generator.cc:40
CFGenerator * clone() const
Definition: cf_generator.cc:52
generate all elements in GF starting from 0
Definition: cf_generator.h:75
bool hasItems() const
Definition: cf_generator.cc:62
CanonicalForm item() const
Definition: cf_generator.cc:72
CFGenerator * clone() const
Definition: cf_generator.cc:89
void operator++()
Definition: cf_generator.h:85
void reset()
Definition: cf_generator.cc:67
generate integers starting from 0
Definition: cf_generator.h:37
CFGenerator * clone() const
Definition: cf_generator.cc:30
void operator++()
Definition: cf_generator.h:47
void reset()
Definition: cf_generator.h:44
CanonicalForm item() const
Definition: cf_generator.cc:20
bool hasItems() const
Definition: cf_generator.cc:15
factory's class for variables
Definition: variable.h:33