Changeset 67294f1 in git
- Timestamp:
- May 13, 2014, 3:53:03 PM (10 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 35f5d9ad091c8da876ba995bb16cca8524433938
- Parents:
- 0ac77c459123ddecaf705f0a8aead6339faa5279
- git-author:
- Martin Lee <martinlee84@web.de>2014-05-13 15:53:03+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2014-05-21 15:06:54+02:00
- Location:
- factory
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_generator.cc
r0ac77c4 r67294f1 12 12 #include "gfops.h" 13 13 #include "ffops.h" 14 15 bool IntGenerator::hasItems() const 16 { 17 return 1; 18 } 19 20 CanonicalForm IntGenerator::item() const 21 { 22 return mapinto (CanonicalForm (current)); 23 } 24 25 void IntGenerator::next() 26 { 27 current++; 28 } 29 30 CFGenerator * IntGenerator::clone () const 31 { 32 return new IntGenerator(); 33 } 14 34 15 35 bool FFGenerator::hasItems() const … … 201 221 CFGenerator * CFGenFactory::generate() 202 222 { 203 ASSERT( getCharacteristic() > 0, "not a finite field" ); 204 if ( getGFDegree() > 1 ) 223 if (getCharacteristic() == 0) 224 return new IntGenerator(); 225 else if ( getGFDegree() > 1 ) 205 226 return new GFGenerator(); 206 227 else -
factory/cf_generator.h
r0ac77c4 r67294f1 20 20 virtual void next() {}; 21 21 virtual CFGenerator * clone() const { return new CFGenerator();} 22 }; 23 24 class IntGenerator : public CFGenerator 25 { 26 private: 27 int current; 28 public: 29 IntGenerator() : current(0) {} 30 ~IntGenerator() {} 31 bool hasItems() const; 32 void reset() { current = 0; } 33 CanonicalForm item() const; 34 void next(); 35 void operator++ () { next(); } 36 void operator++ ( int ) { next(); } 37 CFGenerator * clone() const; 22 38 }; 23 39 -
factory/facAlgFunc.cc
r0ac77c4 r67294f1 493 493 CFGenerator * Gen; 494 494 if (getCharacteristic() == 0) 495 Gen= new IntGenerator();495 Gen= CFGenFactory::generate(); 496 496 else if (degree (vminpoly) > 0) 497 497 Gen= AlgExtGenerator (vminpoly).clone(); 498 498 else 499 Gen= new FFGenerator();499 Gen= CFGenFactory::generate(); 500 500 501 501 CFFList LL= CFFList (CFFactor (f, 1)); -
factory/facAlgFuncUtil.cc
r0ac77c4 r67294f1 20 20 #include "cf_assert.h" 21 21 22 #include "canonicalform.h" 22 23 #include "facAlgFuncUtil.h" 23 24 #include "cfCharSetsUtil.h" … … 91 92 FFRandom gen; 92 93 return find_irreducible (degOfExt, gen, Variable (1)); 93 }94 95 // // missing class: IntGenerator:96 bool IntGenerator::hasItems() const97 {98 return 1;99 }100 101 CanonicalForm IntGenerator::item() const102 //int IntGenerator::item() const103 {104 //return current; //CanonicalForm( current );105 return mapinto (CanonicalForm (current));106 }107 108 void IntGenerator::next()109 {110 current++;111 94 } 112 95 -
factory/facAlgFuncUtil.h
r0ac77c4 r67294f1 18 18 #ifndef FAC_ALG_FUNC_UTIL_H 19 19 #define FAC_ALG_FUNC_UTIL_H 20 21 #include "cf_generator.h"22 23 24 // missing class: IntGenerator:25 class IntGenerator : public CFGenerator26 {27 private:28 int current;29 public:30 IntGenerator() : current(0) {}31 ~IntGenerator() {}32 bool hasItems() const;33 void reset() { current = 0; }34 CanonicalForm item() const;35 void next();36 void operator++ () { next(); }37 void operator++ ( int ) { next(); }38 };39 20 40 21 CFFList
Note: See TracChangeset
for help on using the changeset viewer.