Changeset e2c181 in git
- Timestamp:
- Feb 22, 2012, 4:26:12 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- ff3a4f4a8e655885eb376e551f47339a6de25bf0
- Parents:
- 43bbd6d912fd61156de899f0e8aa1e830a90b6d7
- Location:
- factory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/gfops.cc
r43bbd6 re2c181 190 190 } 191 191 192 //static bool gf_valid_combination ( int p, int n )193 //{194 //int i = 0;195 //while ( i < gf_primes_len && gf_primes[i] != p ) i++;196 //if ( i == gf_primes_len )197 //return false;198 //else199 //{200 //i = n;201 //int a = 1;202 //while ( a < gf_maxtable && i > 0 )203 //{204 //a *= p;205 //i--;206 //}207 //if ( i > 0 || a > gf_maxtable )208 //return false;209 //else210 //return true;211 //}212 //}192 static bool gf_valid_combination ( int p, int n ) 193 { 194 int i = 0; 195 while ( i < gf_primes_len && gf_primes[i] != p ) i++; 196 if ( i == gf_primes_len ) 197 return false; 198 else 199 { 200 i = n; 201 int a = 1; 202 while ( a < gf_maxtable && i > 0 ) 203 { 204 a *= p; 205 i--; 206 } 207 if ( i > 0 || a > gf_maxtable ) 208 return false; 209 else 210 return true; 211 } 212 } 213 213 214 214 void gf_setcharacteristic ( int p, int n, char name ) 215 215 { 216 //ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );216 ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" ); 217 217 gf_name = name; 218 218 gf_get_table( p, n ); -
factory/variable.cc
r43bbd6 re2c181 151 151 #endif /* NOSTREAMIO */ 152 152 153 //static bool legal_mipo( const CanonicalForm & mipo )154 //{155 // ASSERT( mipo.inPolyDomain(), "not a legal extension" );156 // bool ok = true;157 // for ( CFIterator i = mipo; ok && i.hasTerms(); i++ )158 // ok = i.coeff().inBaseDomain();159 // return ok;160 //}161 162 153 static CanonicalForm conv2mipo ( const CanonicalForm & mipo, const Variable alpha ) 163 154 { … … 170 161 Variable rootOf( const CanonicalForm & mipo, char name ) 171 162 { 172 //ASSERT( legal_mipo( mipo ), "not a legal extension");163 ASSERT (mipo.inPolyDomain() && mipo.isUnivariate(), "not a legal extension"); 173 164 174 165 int l;
Note: See TracChangeset
for help on using the changeset viewer.