Changeset 49f1f45 in git
- Timestamp:
- Nov 20, 2007, 11:08:40 AM (16 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 62f8cca6dc508c925bc4d657aea450dafba04fb9
- Parents:
- b1d37f6a1e89cd93b4ecab9f73e8d297d77180c0
- Location:
- factory
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/GNUmakefile.in
rb1d37f r49f1f45 1 1 # @configure_input@ 2 # $Id: GNUmakefile.in,v 1.5 2 2007-11-14 16:00:28Singular Exp $2 # $Id: GNUmakefile.in,v 1.53 2007-11-20 10:08:02 Singular Exp $ 3 3 4 4 # … … 161 161 fac_util.cc \ 162 162 ffops.cc \ 163 ffreval.cc \ 163 164 gf_tabutil.cc \ 164 165 gfops.cc \ … … 229 230 fac_util.h \ 230 231 ffops.h \ 232 ffreval.h \ 231 233 ftmpl_array.h \ 232 234 ftmpl_factor.h \ -
factory/cf_defs.h
rb1d37f r49f1f45 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_defs.h,v 1.1 2 2007-10-31 08:40:52 Singular Exp $ */2 /* $Id: cf_defs.h,v 1.13 2007-11-20 10:08:02 Singular Exp $ */ 3 3 4 4 #ifndef INCL_CF_DEFS_H … … 34 34 const int SW_FAC_QUADRATICLIFT = 5; 35 35 const int SW_USE_EZGCD = 6; 36 const int SW_USE_SPARSEMOD = 7; 37 const int SW_USE_NTL=8; 38 const int SW_USE_NTL_GCD_0=9; 39 const int SW_USE_NTL_GCD_P=10; 40 const int SW_USE_NTL_SORT=11; 41 const int SW_USE_CHINREM_GCD=12; 42 const int SW_USE_GCD_P=13; 36 const int SW_USE_EZGCD_P = 7; 37 const int SW_USE_SPARSEMOD = 8; 38 const int SW_USE_NTL=9; 39 const int SW_USE_NTL_GCD_0=10; 40 const int SW_USE_NTL_GCD_P=11; 41 const int SW_USE_NTL_SORT=12; 42 const int SW_USE_CHINREM_GCD=13; 43 const int SW_USE_GCD_P=14; 43 44 //}}} 44 45 -
factory/cf_gcd.cc
rb1d37f r49f1f45 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_gcd.cc,v 1.5 4 2007-10-31 08:40:52Singular Exp $ */2 /* $Id: cf_gcd.cc,v 1.55 2007-11-20 10:08:03 Singular Exp $ */ 3 3 4 4 #include <config.h> … … 15 15 #include "fac_util.h" 16 16 #include "ftmpl_functions.h" 17 #include "ffreval.h" 17 18 18 19 #ifdef HAVE_NTL … … 490 491 if( gcd_avoid_mtaildegree ( fc, gc, d1 ) ) 491 492 return d1; 493 bool fc_isUnivariate=fc.isUnivariate(); 492 494 if ( getCharacteristic() != 0 ) 493 495 { 494 if (isOn(SW_USE_GCD_P)) 496 if (isOn( SW_USE_EZGCD_P ) && (!fc_isUnivariate)) 497 { 498 if ( pe == 1 ) 499 fc = fin_ezgcd( fc, gc ); 500 else if ( pe > 0 )// no variable at position 1 501 { 502 fc = replacevar( fc, Variable(pe), Variable(1) ); 503 gc = replacevar( gc, Variable(pe), Variable(1) ); 504 fc = replacevar( fin_ezgcd( fc, gc ), Variable(1), Variable(pe) ); 505 } 506 else 507 { 508 pe = -pe; 509 fc = swapvar( fc, Variable(pe), Variable(1) ); 510 gc = swapvar( gc, Variable(pe), Variable(1) ); 511 fc = swapvar( fin_ezgcd( fc, gc ), Variable(1), Variable(pe) ); 512 } 513 } 514 else if (isOn(SW_USE_GCD_P)) 495 515 { 496 516 fc=newGCD(fc,gc); … … 505 525 } 506 526 } 507 else if (!fc .isUnivariate())527 else if (!fc_isUnivariate) 508 528 { 509 529 if ( isOn( SW_USE_EZGCD ) ) -
factory/cf_gcd_charp.cc
rb1d37f r49f1f45 1 #include <factory.h> 1 #include "config.h" 2 #include <stdio.h> 2 3 #ifndef NOSTREAMIO 3 #include <stdio.h>4 4 #include <iostream.h> 5 5 #endif 6 6 #include <math.h> 7 #include <cf_factory.h> 8 #include <variable.h> 9 #include <canonicalform.h> 10 #include <cf_iter.h> 11 #include <cf_random.h> 12 #include <cf_algorithm.h> 13 #include <cf_map.h> 7 14 8 15 static CanonicalForm contentWRT(const CanonicalForm & F, const int lev); 9 static int degWRT( const CanonicalForm &F, const int lev);16 static int degWRT(CanonicalForm F, const int lev); 10 17 static CanonicalForm lcoefWRT( const CanonicalForm & F, const int lev); 11 18 static CanonicalForm newtonInterp(CFList &alpha, CFList &u, const Variable & x); … … 20 27 21 28 22 static CanonicalForm 29 static CanonicalForm 30 contentWRT0(const CanonicalForm & F, const int lev, const int lev0) 31 // Computes the content of a polynomial, considering the variables of level 32 // larger than lev as as parameters. 33 { 34 if(F.inBaseDomain() || (F.mvar().level() <= lev)) 35 { 36 return(1); 37 } 38 else 39 { 40 if (F.isUnivariate()) 41 { 42 return(F); 43 } 44 else 45 { 46 CanonicalForm pol; 47 CFIterator i = CFIterator(F); 48 CanonicalForm c = 0; 49 for(; i.hasTerms(); i++) 50 { 51 CanonicalForm cc=i.coeff(); 52 if (cc.level() > lev0) 53 pol = contentWRT0(cc, lev, lev0-1 ); 54 else 55 pol = contentWRT(cc, lev -1); 56 c = gcd(c, pol); 57 if(c.isOne()) 58 { 59 return c; 60 } 61 } 62 return c; 63 } 64 } 65 } 66 67 static CanonicalForm 23 68 contentWRT(const CanonicalForm & F, const int lev) 24 69 // Computes the content of a polynomial, considering the variables of level 25 70 // larger than lev as as parameters. 26 71 { 72 //if (lev <0) 73 // cout << "contentWRT:" <<F << " " << lev <<"\n";//printf("level=%d\n",lev); 27 74 //int debug = 0; 28 75 //if(debug == 1)cout << "contentWRT input - F: " << F << " lev: " << lev << endl; 29 CanonicalForm pol;30 if(F.mvar().level() <= lev){76 if(F.inBaseDomain() || (F.mvar().level() <= lev)) 77 { 31 78 //if(debug == 1)cout << "output 1:" << F << endl; 32 79 return(1); 33 } else { 34 if (F.isUnivariate() == 1){ 80 } 81 else 82 { 83 if (F.isUnivariate()) 84 { 35 85 //if(debug == 1)cout << "output 2:" << F << endl; 36 86 return(F); 37 } else { 38 CFIterator i = CFIterator(F, lev); 87 } 88 else 89 { 90 CanonicalForm pol; 91 CFIterator i = CFIterator(F); 39 92 CanonicalForm c = 0; 40 for(; i.hasTerms(); i++){ 41 pol = contentWRT(i.coeff(), lev - 1); 93 for(; i.hasTerms(); i++) 94 { 95 CanonicalForm cc=i.coeff(); 96 if (cc.level() > lev) 97 pol = contentWRT0(cc, lev, cc.level()); 98 else 99 pol = contentWRT(i.coeff(), lev - 1); 42 100 //if(debug == 1)cout << "c: " << c << " - pol : " << pol << endl; 43 101 c = gcd(c, pol); 44 102 //if(debug == 1)cout << "c temp:" << c << endl; 45 if(c.isOne()){ 103 if(c.isOne()) 104 { 46 105 //if(debug == 1)cout << "output 3:" << c << endl; 47 106 return c; … … 55 114 56 115 // Degree of F wrt all variables of level smaller than or equal to lev 57 static int 58 degWRT(const CanonicalForm & F, const int lev) 116 static int degWRT(CanonicalForm F, const int lev) 117 { 118 int deg = F.degree(lev); 119 for(int i = lev; i >= 1; i--) 120 { 121 F = F.LC(i); 122 deg = deg + F.degree(i - 1); 123 } 124 return deg; 125 } 126 127 // Leading coefficient of F wrt all variables of level smaller than or equal to lev. 128 static CanonicalForm lcoefWRT(const CanonicalForm & F, const int lev) 59 129 { 60 130 CanonicalForm FL; 61 131 FL = F; 62 132 63 int deg = FL.degree(lev);64 for(int i = lev; i >= 1; i--){133 for(int i = lev; i >= 1; i--) 134 { 65 135 FL = FL.LC(i); 66 deg = deg + FL.degree(i - 1); 67 } 68 return deg; 69 } 70 71 // Leading coefficient of F wrt all variables of level smaller than or equal to lev. 136 } 137 return FL; 138 } 139 140 72 141 static CanonicalForm 73 lcoefWRT(const CanonicalForm & F, const int lev)74 {75 CanonicalForm FL;76 FL = F;77 78 for(int i = lev; i >= 1; i--){79 FL = FL.LC(i);80 }81 return FL;82 }83 84 85 static CanonicalForm86 142 newtonInterp(const CanonicalForm alpha, const CanonicalForm u, const CanonicalForm newtonPoly, const CanonicalForm oldInterPoly, const Variable & x) 87 143 // Newton interpolation - Incremental algorithm. 88 144 // Given a list of values alpha_i and a list of polynomials u_i, 1 <= i <= n, 89 // computes the interpolation polynomial assuming that 90 // the polynomials in u are the results of evaluating the variabe x 145 // computes the interpolation polynomial assuming that 146 // the polynomials in u are the results of evaluating the variabe x 91 147 // of the unknown polynomial at the alpha values. 92 // This incremental version receives only the values of alpha_n and u_n and 148 // This incremental version receives only the values of alpha_n and u_n and 93 149 // the previous interpolation polynomial for points 1 <= i <= n-1, and computes 94 150 // the polynomial interpolating in all the points. … … 97 153 /* 98 154 int debug = 0; 99 if(debug){ 155 if(debug) 156 { 100 157 cout << "newtonInterpIncremental input - variable " << x <<endl; 101 158 cout << "newtonInterpIncremental input - alpha:" << alpha << " - u: " << u << endl; … … 114 171 115 172 // Univariate GCD 116 // Naive implementation of Euclidean Algorithm. 173 // Naive implementation of Euclidean Algorithm. 117 174 // Should be used only for GCD of univariate polys over finite fields, 118 175 // where there is no coefficient growth. 119 static CanonicalForm 120 simpleGCD(const CanonicalForm & A, const CanonicalForm & B) 176 static CanonicalForm simpleGCD(const CanonicalForm & A, const CanonicalForm & B) 121 177 { 122 178 //int debug = 0; 123 179 CanonicalForm P1, P2; 124 180 /* 125 if(debug == 1){ 181 if(debug == 1) 182 { 126 183 cout << "simpleGCD input" << endl; 127 184 cout << "A: " << A << endl; … … 129 186 } 130 187 */ 131 if (A.degree() > B.degree()){ 188 if (A.degree() > B.degree()) 189 { 132 190 P1 = A; 133 191 P2 = B; 134 } else { 192 } 193 else 194 { 135 195 P1 = B; 136 196 P2 = A; … … 150 210 151 211 152 static CanonicalForm 153 GFPowDown(const CanonicalForm & A, int k) 212 static CanonicalForm GFPowDown(const CanonicalForm & A, int k) 154 213 // Replaces all coefficients of A in the ground field by their k-th roots. 155 // It assumes that the k-th roots exist. 214 // It assumes that the k-th roots exist. 156 215 // This procedure is used to map down a polynomial from an extension field. 157 216 { … … 166 225 //cout << "i: " << i << endl; 167 226 //cout << "A[i]: " << A[i] << endl; 168 if(A[i].inBaseDomain()){ 227 if(A[i].inBaseDomain()) 228 { 169 229 //cout << "GFPowDown - inBaseDomain" << endl; 170 230 g = getGFGenerator(); … … 175 235 j++; 176 236 } 177 if(j == fieldSize + 1) return(-1);237 if(j == fieldSize + 1) return(-1); 178 238 result = result + power(g, j) * power(A.mvar(), i); 179 239 //cout << "power(A[i], k): " << power(A[i], k) << endl; 180 240 //cout << "result: " << result << endl; 181 } else { 182 //cout << "not inBaseDomain" << endl; 241 } 242 else 243 { 244 //cout << "not inBaseDomain" << endl; 183 245 result = result + GFPowDown(A[i], k) * power(A.mvar(), i);; 184 246 // power(pol[i], k) * power(A.mvar(), i); … … 190 252 } 191 253 192 static CanonicalForm 193 GFPowUp(const CanonicalForm & A, int k) 254 static CanonicalForm GFPowUp(const CanonicalForm & A, int k) 194 255 // Raises all coefficients of A in the ground field to the power k. 195 256 // Used for maping a polynomial to an extension field. 196 257 { 258 //cout << "A:" << A <<"\n"; 197 259 CanonicalForm result = 0; 198 260 int i; … … 203 265 //cout << "i: " << i << endl; 204 266 //cout << "A[i]: " << A[i] << endl; 205 if(A[i].inBaseDomain()){ 267 if(A[i].inBaseDomain()) 268 { 206 269 //cout << "inBaseDomain" << endl; 207 270 result = result + power(A[i], k) * power(A.mvar(), i); 208 271 //cout << "power(A[i], k): " << power(A[i], k) << endl; 209 272 //cout << "result: " << result << endl; 210 } else { 211 //cout << "not inBaseDomain" << endl; 273 } 274 else 275 { 276 //cout << "not inBaseDomain" << endl; 212 277 result = result + GFPowUp(A[i], k) * power(A.mvar(), i);; 213 278 } 214 279 } 215 280 } 281 //cout << "result:" << result <<"\n"; 216 282 return(result); 217 283 } 218 284 219 CanonicalForm 220 GFMapUp(const CanonicalForm & A, int k) 285 CanonicalForm GFMapUp(const CanonicalForm & A, int k) 221 286 // Maps all coefficients of A to the base domain, asumming A is in GF(p^k). 287 // The current base domain must be GF(p^j), with j a multiple of k. 288 { 289 int p = getCharacteristic(); 290 int expon = getGFDegree(); 291 int extExp = expon / k; 292 // Assumes that we are using Conway polynomials 293 return(GFPowUp(A, extExp)); 294 } 295 296 CanonicalForm GFMapDown(const CanonicalForm & A, int k) 297 // Maps all coefficients of A from the base domain to GF(p^k). 222 298 // The current base domain must be GF(p^j), with j a multiple of k. 223 299 { … … 225 301 int expon = getGFDegree(); 226 302 //cout << "Expon: " << expon << endl; 227 int extExp = (pow(p, expon) - 1) / (pow(p, k) - 1); // Assumes that we are using Conway polynomials 228 return(GFPowUp(A, extExp)); 229 } 230 231 CanonicalForm 232 GFMapDown(const CanonicalForm & A, int k) 233 // Maps all coefficients of A from the base domain to GF(p^k). 234 // The current base domain must be GF(p^j), with j a multiple of k. 235 { 236 int p = getCharacteristic(); 237 int expon = getGFDegree(); 238 //cout << "Expon: " << expon << endl; 239 int extExp = (pow(p, expon) - 1) / (pow(p, k) - 1); // Assumes that we are using Conway polynomials 303 int extExp = expon / k; 304 // Assumes that we are using Conway polynomials 240 305 return(GFPowDown(A, extExp)); 241 306 } 242 307 243 CanonicalForm 244 newGCD(CanonicalForm A, CanonicalForm B) 308 CanonicalForm newGCD(CanonicalForm A, CanonicalForm B) 245 309 // Computes the GCD of two polynomials over a prime field. 246 310 // Based on Algorithm 7.2 from "Algorithms for Computer Algebra" 247 311 { 248 / *249 int debug = 0;250 if(debug){251 cout << "newGCD input" << endl;252 cout << "A: " << A << endl;253 cout << "B: " << B << endl;254 }255 */ 256 257 if(A*1 == 0){312 //int debug = 1; 313 //if(debug) 314 //{ 315 // cout << "newGCD input" << endl; 316 // cout << "A: " << A << endl; 317 // cout << "B: " << B << endl; 318 //} 319 320 if(A*1 == 0) 321 { 258 322 //if(debug)cout << "A Zero!" << endl; 259 return(B); 260 } 261 if(B*1 == 0){ 323 return(abs(B)); 324 } 325 if(B*1 == 0) 326 { 262 327 //if(debug)cout << "B Zero!" << endl; 263 return(A); 264 } 265 328 return(abs(A)); 329 } 330 if (A.inBaseDomain()) return A.genOne(); 331 if (B.inBaseDomain()) return B.genOne(); 266 332 267 333 CanonicalForm pol; 268 334 int p = getCharacteristic(); 269 int k = getGFDegree(); 270 int fieldSize = pow(p, k); 271 272 /* 273 if(debug){ 274 cout << "p: " << p << endl; 275 cout << "k: " << k << endl; 276 cout << "fieldSize: " << fieldSize << endl; 277 cout << "pow: " << pow(p, k) << endl; 278 } 279 */ 280 335 int k = 1; 336 int fieldSize = p; 337 if (CFFactory::gettype() == GaloisFieldDomain) 338 { 339 k=getGFDegree(); 340 fieldSize = pow(p, k); 341 } 342 343 //if(debug) 344 //{ 345 // cout << "p: " << p << endl; 346 // cout << "k: " << k << endl; 347 // cout << "fieldSize: " << fieldSize << endl; 348 // cout << "pow: " << pow(p, k) << endl; 349 //} 350 351 CFMap M,N; 352 compress(A,B,M,N); 353 A=M(A); 354 B=M(B); 281 355 // Compute the main variable (the largest in A and B) 282 int mv; 283 Variable x; 284 x = A.mvar(); 285 mv = x.level(); 286 if(B.mvar().level() > mv) { 287 x = A.mvar(); 356 Variable x = A.mvar(); 357 int mv = x.level(); 358 if(B.mvar().level() > mv) 359 { 360 x = B.mvar(); 288 361 mv = x.level(); 289 362 } 290 363 //cout << "main variable " << x << endl << endl; 291 364 292 365 // Checks for univariate polynomial 293 366 if ( mv == 1 ) 294 367 { 295 368 // This call can be replaced by a faster GCD algorithm 296 369 pol = simpleGCD(A, B); // Univariate GCD 297 370 //cout << "newGCD output 1: " << pol << endl; 298 return pol;371 return N(pol); 299 372 } 300 373 301 374 CanonicalForm b; 302 375 CFArray bArray(0, fieldSize-1); // Stores the bs already used 303 int sizebArray = 0;376 int sizebArray; 304 377 305 378 GFRandom genGF; … … 307 380 int i, j; 308 381 int used; 309 382 310 383 CanonicalForm c; // gcd of the contents 311 384 CanonicalForm C; … … 331 404 332 405 CanonicalForm Ab, Bb, gb; // A, B and g evaluated at b 333 406 334 407 int m; // degree of the gcd of Ab and Bb 335 408 int n = degWRT(Ap, mv - 1); 336 if(degWRT(Bp, mv - 1) < n){ 409 if(degWRT(Bp, mv - 1) < n) 410 { 337 411 n = degWRT(Bp, mv - 1); 338 412 } 339 413 340 414 int fail = 0; 341 415 int goodb; 342 416 // The main loop 343 do{ 344 // Searches for a good b. If there are no more possible b, the algorithm fails. 417 //cout << "start loop\n"; 418 sizebArray = 0; 419 do 420 { 421 // Searches for a good b. 422 // If there are no more possible b, the algorithm fails. 345 423 goodb = 0; 346 if(sizebArray == (fieldSize - 1)){ 424 if(sizebArray >= fieldSize-1) 425 { 347 426 // An extension field is needed. 348 427 fail = 1; 349 } else { 350 do{ 428 } 429 else 430 { 431 do 432 { 351 433 // Searches for a new element of the ground field 352 do{ 434 do 435 { 353 436 // New element of the ground field 354 if(k > 1){ 437 if(k > 1) 438 { 355 439 b = genGF.generate(); 356 } else { 440 } 441 else 442 { 357 443 b = genFF.generate(); 358 444 } 445 //cout << "try(" << sizebArray << "):" << b; 359 446 // Checks if this element was already used 360 447 used = 0; 361 for(i = 0; i < sizebArray; i++){ 448 for(i = 0; i < sizebArray; i++) 449 { 362 450 // Multiplication by 1 is used to prevent a bug which 363 451 // produces b=a^(q-1) as a random element. 364 if((bArray[i]*1) == (b*1)){ 452 if((bArray[i]*1) == (b*1)) 453 { 365 454 used = 1; 455 //cout << " used\n"; 366 456 } 367 457 } 368 458 //if(debug==1)cout << "b: " << b << endl; 369 } while(used == 1); 459 } 460 while(used == 1); 370 461 bArray[sizebArray] = b; 371 462 sizebArray++; 372 463 // b must not cancel the gcd of the leading coefficients 373 if(g(b, mv) != 0){ 464 if(g(b, mv) != 0) 465 { 374 466 goodb = 1; 467 // cout << " good\n"; 375 468 } 376 469 else 377 { 470 { 471 // cout << " bad"; 378 472 if(sizebArray == fieldSize - 1) 379 473 { 380 474 fail = 1; 475 //cout << " out of elems " << sizebArray << "tried"; 381 476 } 382 } 383 } while((goodb == 0) && (fail == 0)); 384 } 385 if(fail == 1){ 477 //cout << "\n"; 478 } 479 } 480 while((goodb == 0) && (fail == 0)); 481 } 482 if(fail) 483 { 386 484 // Algorithm fails. An extension is needed. 387 485 388 486 // Computes the exponent of the ring extension so as to have enough interpolation points. 389 487 int degMax; 390 if(totaldegree(A) > totaldegree(B)){ 488 if(totaldegree(A) > totaldegree(B)) 489 { 391 490 degMax = totaldegree(A); 392 } else { 491 } 492 else 493 { 393 494 degMax = totaldegree(B); 394 495 } 395 int expon = 1; 396 while(pow(fieldSize, expon) < degMax){ 496 int expon = 2; // expon <= will not extend the field 497 while(pow(fieldSize, expon) < degMax) 498 { 397 499 expon++; 398 500 } 399 501 //if(debug)cout << "Not enough elements in the base field. An extension to " << p << "^" << k*expon << " is needed." << endl; 400 if(k > 1){ 401 setCharacteristic(p, k * expon, 'b'); 402 CanonicalForm P1 = GFMapUp(A, k); 403 CanonicalForm P2 = GFMapUp(B, k); 404 pol = newGCD(P1, P2); 405 pol = GFMapDown(pol, k); 406 setCharacteristic(p, k, 'a'); 407 //if(debug)cout << "newGCD output 5: " << pol << endl; 408 return pol; 409 } else { 410 setCharacteristic(p, k * expon, 'a'); 411 CanonicalForm P1 = A.mapinto(); 412 CanonicalForm P2 = B.mapinto(); 413 pol = newGCD(P1, P2); 414 setCharacteristic(p); 415 //if(debug)cout << "newGCD output 4: " << pol << endl; 416 return(pol); 417 } 418 } else { 502 if(k > 1) 503 { 504 if(pow(p,k * expon) < (1<<16)) 505 { 506 setCharacteristic(p, k * expon, 'b'); 507 CanonicalForm P1 = GFMapUp(A, k); 508 CanonicalForm P2 = GFMapUp(B, k); 509 //cout << "newGCD(mapped):" << P1 << " , " << P2 <<"\n"; 510 pol = newGCD(P1, P2); 511 pol = GFMapDown(pol, k); 512 setCharacteristic(p, k, 'a'); 513 //if(debug)cout << "newGCD output 5: " << pol << endl; 514 CanonicalForm temp=N(pol); 515 temp/=temp.lc(); 516 return temp; 517 } 518 else 519 { 520 Off(SW_USE_GCD_P); 521 CanonicalForm temp=N(gcd( A, B)); 522 On(SW_USE_GCD_P); 523 return temp; 524 } 525 } 526 else 527 { 528 if(pow(p,k * expon) < (1<<16)) 529 { 530 setCharacteristic(p, k * expon, 'a'); 531 CanonicalForm P1 = A.mapinto(); 532 CanonicalForm P2 = B.mapinto(); 533 pol = newGCD(P1, P2); 534 setCharacteristic(p); 535 //if(debug)cout << "newGCD output 4: " << pol << endl; 536 CanonicalForm temp=N(pol); 537 temp/=temp.lc(); 538 return temp; 539 } 540 else 541 { 542 Off(SW_USE_GCD_P); 543 CanonicalForm temp=N(gcd( A, B)); 544 On(SW_USE_GCD_P); 545 return temp; 546 } 547 } 548 } 549 else 550 { 419 551 // Evaluate the polynomials in b 420 552 Ab = Ap(b, mv); … … 429 561 Cb /= Cblc; 430 562 // Test for unlucky homomorphism 431 if(m < n){ 563 if(m < n) 564 { 432 565 // The degree decreased, we have to start it all over. 433 566 H = Cb; 434 567 newtonPoly = newtonPoly * (x - b); 435 568 n = m; 436 } else if(m == n) { 569 } 570 else if(m == n) 571 { 437 572 // Good b 438 573 H = newtonInterp(b, Cb, newtonPoly, H, x); 439 574 newtonPoly = newtonPoly * (x - b); 440 if(lcoefWRT(H, mv - 1) == g){ 575 if(lcoefWRT(H, mv - 1) == g) 576 { 441 577 C = H / contentWRT(H, mv - 1); // primpart 442 if(fdivides(C, B) && fdivides(C, B))443 578 if(fdivides(C, A) && fdivides(C, B)) 579 { 444 580 //if(debug)cout << "newGCD output 2: " << c * C<< endl; 445 return (c * C);581 return N(c * C); 446 582 } 447 448 583 else 584 { 449 585 if(m == 0) 450 586 { 451 587 //if(debug)cout << "newGCD output 3: " << c << endl; 452 return (c);588 return N(c); 453 589 } 454 590 } … … 473 609 cout << "setCharacteristic(2, 4, 'a')" << endl; 474 610 setCharacteristic(2, 4, 'a'); 475 611 476 612 int k = getGFDegree(); 477 613 int p = getCharacteristic(); -
factory/cf_reval.h
rb1d37f r49f1f45 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_reval.h,v 1. 5 2005-11-18 10:03:49 pohlExp $ */2 /* $Id: cf_reval.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ 3 3 4 4 #ifndef INCL_CF_REVAL_H … … 15 15 class REvaluation : public Evaluation 16 16 { 17 pr ivate:17 protected: // neeeded in FFREvaluation 18 18 CFRandom * gen; 19 19 public: -
factory/cf_switches.cc
rb1d37f r49f1f45 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_switches.cc,v 1. 8 2007-09-26 09:17:40Singular Exp $ */2 /* $Id: cf_switches.cc,v 1.9 2007-11-20 10:08:03 Singular Exp $ */ 3 3 4 4 //{{{ docu … … 36 36 #endif 37 37 On(SW_USE_EZGCD); 38 //On(SW_USE_EZGCD_P); // still testing 38 39 } 39 40 //}}} -
factory/cf_switches.h
rb1d37f r49f1f45 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_switches.h,v 1.1 1 2007-10-31 08:40:53 Singular Exp $ */2 /* $Id: cf_switches.h,v 1.12 2007-11-20 10:08:03 Singular Exp $ */ 3 3 4 4 #ifndef INCL_CF_SWITCHES_H … … 19 19 // 20 20 //}}} 21 const int CFSwitchesMax = 1 4;21 const int CFSwitchesMax = 15; 22 22 //}}} 23 23 -
factory/winnt/factory.h
rb1d37f r49f1f45 1 /* ../factory/winnt/factory.h automatically generated by makeheader from ../factory/factory.template */1 /* winnt/factory.h automatically generated by makeheader from factory.template */ 2 2 /* emacs edit mode for this file is -*- C++ -*- */ 3 /* $Id: factory.h,v 1. 5 1997-12-09 16:37:34 schmidtExp $ */3 /* $Id: factory.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ 4 4 5 5 #ifndef INCL_FACTORY_H … … 26 26 27 27 #ifndef NOSTREAMIO 28 #ifdef HAVE_IOSTREAM 29 #include <iostream> 30 #define OSTREAM std::ostream 31 #define ISTREAM std::istream 32 #elif defined(HAVE_IOSTREAM_H) 28 33 #include <iostream.h> 34 #define OSTREAM ostream 35 #define ISTREAM istream 36 #endif 29 37 #endif /* ! NOSTREAMIO */ 30 38 31 39 #ifdef SINGULAR 32 extern "C" { 40 #include "cf_gmp.h" 41 #else 33 42 #include <gmp.h> 34 }35 43 #endif /* SINGULAR */ 36 44 37 45 #ifdef macintosh 38 #include <: :templates:ftmpl_array.h>39 #include <: :templates:ftmpl_factor.h>40 #include <: :templates:ftmpl_list.h>41 #include <: :templates:ftmpl_matrix.h>46 #include <:templates:ftmpl_array.h> 47 #include <:templates:ftmpl_factor.h> 48 #include <:templates:ftmpl_list.h> 49 #include <:templates:ftmpl_matrix.h> 42 50 #else 43 51 #include <templates/ftmpl_array.h> … … 47 55 #endif 48 56 49 /* stuff included from . ./factory/cf_globals.h */57 /* stuff included from ./cf_globals.h */ 50 58 51 59 … … 54 62 55 63 56 /* stuff included from . ./factory/cf_primes.h */64 /* stuff included from ./cf_primes.h */ 57 65 58 66 … … 70 78 71 79 72 /* stuff included from . ./factory/cf_defs.h */80 /* stuff included from ./cf_defs.h */ 73 81 74 82 … … 99 107 const int SW_USE_EZGCD = 6; 100 108 const int SW_USE_SPARSEMOD = 7; 101 //}}} 102 103 104 /* stuff included from ../factory/variable.h */ 109 const int SW_USE_NTL=8; 110 const int SW_USE_NTL_GCD_0=9; 111 const int SW_USE_NTL_GCD_P=10; 112 const int SW_USE_NTL_SORT=11; 113 const int SW_USE_CHINREM_GCD=12; 114 const int SW_USE_GCD_P=13; 115 //}}} 116 117 118 /* stuff included from ./variable.h */ 105 119 106 120 … … 153 167 } 154 168 #ifndef NOSTREAMIO 155 friend ostream & operator << ( ostream& os, const Variable & v );169 friend OSTREAM & operator << ( OSTREAM & os, const Variable & v ); 156 170 #endif /* NOSTREAMIO */ 157 friend Variable rootOf( const CanonicalForm &, char name = '@' ); 158 }; 171 friend void swap_levels(); 172 friend Variable rootOf( const CanonicalForm &, char name ); 173 }; 174 Variable rootOf( const CanonicalForm &, char name = '@' ); 159 175 160 176 inline int level( const Variable & v ) { return v.level(); } … … 166 182 char getDefaultExtName(); 167 183 168 169 /* stuff included from ../factory/canonicalform.h */ 184 int ExtensionLevel(); 185 186 187 /* stuff included from ./canonicalform.h */ 188 189 190 #undef CF_INLINE 191 #define CF_INLINE 192 #undef CF_NO_INLINE 193 #define CF_NO_INLINE 194 195 196 class InternalCF; 197 198 inline int is_imm ( const InternalCF * const ptr ) 199 { 200 // returns 0 if ptr is not immediate 201 return ( ((int)((long)ptr)) & 3 ); 202 } 170 203 171 204 … … 173 206 174 207 static int cf_is_initialized_now = initCanonicalForm(); 175 176 class InternalCF;177 208 178 209 //{{{ class CanonicalForm … … 183 214 public: 184 215 // constructors, destructors, selectors 185 C anonicalForm();186 C anonicalForm( const CanonicalForm& );187 C anonicalForm( InternalCF* );188 C anonicalForm( const int );189 C anonicalForm( const Variable & );190 C anonicalForm( const Variable &, int );191 CanonicalForm( const char * ); // use with caution - does only handle integers !!!192 193 ~CanonicalForm();216 CF_INLINE CanonicalForm(); 217 CF_INLINE CanonicalForm( const CanonicalForm& ); 218 CF_INLINE CanonicalForm( InternalCF* ); 219 CF_INLINE CanonicalForm( const int ); 220 CF_INLINE CanonicalForm( const Variable & ); 221 CF_INLINE CanonicalForm( const Variable &, int ); 222 CanonicalForm( const char *, const int base=10 ); // use with caution - does only handle integers !!! 223 224 CF_NO_INLINE ~CanonicalForm(); 194 225 195 226 InternalCF* getval() const; // use with caution !!! … … 198 229 199 230 // predicates 200 bool isOne() const;201 bool isZero() const;202 bool isImm() const;231 CF_NO_INLINE bool isOne() const; 232 CF_NO_INLINE bool isZero() const; 233 inline bool isImm() const { return is_imm( value ); }; 203 234 204 235 bool inZ() const; … … 215 246 bool isFFinGF() const; 216 247 bool isUnivariate() const; 248 bool isHomogeneous() const; 217 249 218 250 // conversion functions … … 238 270 239 271 // assignment operators 240 C anonicalForm& operator = ( const CanonicalForm& );241 C anonicalForm& operator = ( const int );272 CF_NO_INLINE CanonicalForm& operator = ( const CanonicalForm& ); 273 CF_NO_INLINE CanonicalForm& operator = ( const int ); 242 274 243 275 CanonicalForm& operator += ( const CanonicalForm& ); … … 269 301 270 302 // arithmetic operators 271 friend CanonicalForm operator - ( const CanonicalForm& ); 272 273 friend CanonicalForm operator + ( const CanonicalForm&, const CanonicalForm& ); 274 friend CanonicalForm operator - ( const CanonicalForm&, const CanonicalForm& ); 275 friend CanonicalForm operator * ( const CanonicalForm&, const CanonicalForm& ); 276 friend CanonicalForm operator / ( const CanonicalForm&, const CanonicalForm& ); 277 friend CanonicalForm operator % ( const CanonicalForm&, const CanonicalForm& ); 278 279 friend CanonicalForm div ( const CanonicalForm&, const CanonicalForm& ); 280 friend CanonicalForm mod ( const CanonicalForm&, const CanonicalForm& ); 303 friend CF_NO_INLINE CanonicalForm operator - ( const CanonicalForm& ); 281 304 282 305 friend void divrem ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& ); 283 306 friend bool divremt ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& ); 284 307 308 friend CanonicalForm bgcd ( const CanonicalForm &, const CanonicalForm & ); 309 friend CanonicalForm bextgcd ( const CanonicalForm &, const CanonicalForm &, CanonicalForm &, CanonicalForm & ); 310 311 // input/output 285 312 #ifndef NOSTREAMIO 286 void print( ostream&, char * ) const; 287 friend ostream& operator << ( ostream&, const CanonicalForm& ); 288 friend istream& operator >> ( istream&, CanonicalForm& ); 313 void print( OSTREAM&, char * ) const; 314 void print( OSTREAM& ) const; 315 friend OSTREAM& operator << ( OSTREAM&, const CanonicalForm& ); 316 friend ISTREAM& operator >> ( ISTREAM&, CanonicalForm& ); 289 317 #endif /* NOSTREAMIO */ 290 318 … … 298 326 //}}} 299 327 300 // some useful functions 328 CF_INLINE CanonicalForm 329 operator + ( const CanonicalForm&, const CanonicalForm& ); 330 331 CF_NO_INLINE CanonicalForm 332 operator - ( const CanonicalForm&, const CanonicalForm& ); 333 334 CF_INLINE CanonicalForm 335 operator * ( const CanonicalForm&, const CanonicalForm& ); 336 337 CF_NO_INLINE CanonicalForm 338 operator / ( const CanonicalForm&, const CanonicalForm& ); 339 340 CF_NO_INLINE CanonicalForm 341 operator % ( const CanonicalForm&, const CanonicalForm& ); 342 343 CF_NO_INLINE CanonicalForm 344 div ( const CanonicalForm&, const CanonicalForm& ); 345 346 CF_NO_INLINE CanonicalForm 347 mod ( const CanonicalForm&, const CanonicalForm& ); 348 301 349 302 350 //{{{ function declarations from canonicalform.cc 351 CanonicalForm blcm ( const CanonicalForm & f, const CanonicalForm & g ); 352 303 353 CanonicalForm power ( const CanonicalForm & f, int n ); 304 354 305 355 CanonicalForm power ( const Variable & v, int n ); 306 307 bool divides ( const CanonicalForm & f, const CanonicalForm & g );308 356 //}}} 309 357 … … 313 361 CanonicalForm extgcd ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& ); 314 362 315 CanonicalForm iextgcd ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );316 317 363 CanonicalForm lcm ( const CanonicalForm&, const CanonicalForm& ); 318 364 … … 324 370 325 371 CanonicalForm icontent ( const CanonicalForm & f ); 372 373 CanonicalForm vcontent ( const CanonicalForm & f, const Variable & x ); 326 374 //}}} 327 375 … … 386 434 level ( const CanonicalForm & f ) { return f.level(); } 387 435 388 inline CanonicalForm436 inline Variable 389 437 mvar ( const CanonicalForm & f ) { return f.mvar(); } 390 438 … … 394 442 inline CanonicalForm 395 443 den ( const CanonicalForm & f ) { return f.den(); } 444 445 inline int 446 sign ( const CanonicalForm & a ) { return a.sign(); } 396 447 397 448 inline CanonicalForm … … 418 469 } 419 470 420 inline CanonicalForm421 abs ( const CanonicalForm & f )422 {423 if ( f < 0 )424 return -f;425 else426 return f;427 }428 429 471 inline int 430 472 headdegree ( const CanonicalForm & f ) { return totaldegree( head( f ) ); } 473 474 431 475 //}}} 432 476 … … 456 500 457 501 458 /* stuff included from . ./factory/cf_binom.h */502 /* stuff included from ./cf_binom.h */ 459 503 460 504 … … 462 506 463 507 464 /* stuff included from . ./factory/cf_algorithm.h */508 /* stuff included from ./cf_algorithm.h */ 465 509 466 510 … … 472 516 void psqr ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & q, CanonicalForm & r, const Variable & x ); 473 517 474 CanonicalForm common_den ( const CanonicalForm & f ); 518 CanonicalForm bCommonDen ( const CanonicalForm & f ); 519 520 bool fdivides ( const CanonicalForm & f, const CanonicalForm & g ); 521 522 CanonicalForm maxNorm ( const CanonicalForm & f ); 523 524 CanonicalForm euclideanNorm ( const CanonicalForm & f ); 475 525 //}}} 476 526 … … 479 529 480 530 void chineseRemainder ( const CFArray & x, const CFArray & q, CanonicalForm & xnew, CanonicalForm & qnew ); 531 532 CanonicalForm Farey ( const CanonicalForm & f, const CanonicalForm & q ); 481 533 //}}} 482 534 483 535 //{{{ function declarations from cf_factor.cc 536 bool isPurePoly(const CanonicalForm & f); 537 538 bool isPurePoly_m(const CanonicalForm & f); 539 484 540 CFFList factorize ( const CanonicalForm & f, bool issqrfree = false ); 485 541 … … 489 545 490 546 bool isSqrFree ( const CanonicalForm & f ); 547 548 CanonicalForm homogenize( const CanonicalForm & f, const Variable & x); 549 CanonicalForm homogenize( const CanonicalForm & f, const Variable & x, 550 const Variable & v1, const Variable & v2); 551 Variable get_max_degree_Variable(const CanonicalForm & f); 552 CFList get_Terms( const CanonicalForm & f ); 553 void getTerms( const CanonicalForm & f, const CanonicalForm & t, CFList & result ); 554 555 491 556 //}}} 492 557 … … 503 568 //}}} 504 569 505 506 /* stuff included from ../factory/cf_eval.h */ 570 //{{{ inline CanonicalForm abs ( const CanonicalForm & f ) 571 //{{{ docu 572 // 573 // abs() - return absolute value of `f'. 574 // 575 // The absolute value is defined in terms of the function 576 // `sign()'. If it reports negative sign for `f' than -`f' is 577 // returned, otherwise `f'. 578 // 579 // This behaviour is most useful for integers and rationals. But 580 // it may be used to sign-normalize the leading coefficient of 581 // arbitrary polynomials, too. 582 // 583 // Type info: 584 // ---------- 585 // f: CurrentPP 586 // 587 //}}} 588 inline CanonicalForm 589 abs ( const CanonicalForm & f ) 590 { 591 // it is not only more general to use `sign()' instead of a 592 // direct comparison `f < 0', it is faster, too 593 if ( sign( f ) < 0 ) 594 return -f; 595 else 596 return f; 597 } 598 //}}} 599 600 601 /* stuff included from ./cf_eval.h */ 507 602 508 603 … … 525 620 virtual void nextpoint(); 526 621 #ifndef NOSTREAMIO 527 friend ostream& operator<< ( ostream& s, const Evaluation &e );622 friend OSTREAM& operator<< ( OSTREAM& s, const Evaluation &e ); 528 623 #endif /* NOSTREAMIO */ 529 624 }; 530 625 531 626 532 /* stuff included from . ./factory/cf_generator.h */627 /* stuff included from ./cf_generator.h */ 533 628 534 629 … … 574 669 }; 575 670 576 class AlgExtGenerator : public CFGenerator671 class AlgExtGenerator //??? : public CFGenerator 577 672 { 578 673 private: 579 674 Variable algext; 580 CFGenerator **gens; 675 FFGenerator **gensf; 676 GFGenerator **gensg; 581 677 int n; 582 678 bool nomoreitems; … … 603 699 604 700 605 /* stuff included from ../factory/cf_iter.h */ 701 /* stuff included from ./cf_iter.h */ 702 703 704 #undef CF_INLINE 705 #define CF_INLINE 706 #undef CF_NO_INLINE 707 #define CF_NO_INLINE 606 708 607 709 … … 625 727 CFIterator& operator= ( const CanonicalForm& ); 626 728 627 CF Iterator& operator++ ();628 CF Iterator& operator++ ( int );629 int hasTerms () const;630 C anonicalForm coeff () const;631 int exp () const;632 }; 633 634 635 /* stuff included from . ./factory/cf_random.h */729 CF_NO_INLINE CFIterator& operator++ (); 730 CF_NO_INLINE CFIterator& operator++ ( int ); 731 CF_NO_INLINE int hasTerms () const; 732 CF_NO_INLINE CanonicalForm coeff () const; 733 CF_NO_INLINE int exp () const; 734 }; 735 736 737 /* stuff included from ./cf_random.h */ 636 738 637 739 … … 700 802 701 803 702 /* stuff included from . ./factory/cf_irred.h */804 /* stuff included from ./cf_irred.h */ 703 805 704 806 … … 706 808 707 809 708 /* stuff included from . ./factory/fac_util.h */810 /* stuff included from ./fac_util.h */ 709 811 710 812 … … 736 838 void divremainder( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & quot, CanonicalForm & rem, const modpk & pk ); 737 839 738 CanonicalForm maxCoeff( const CanonicalForm & f );739 740 840 bool Hensel ( const CanonicalForm & U, CFArray & G, const CFArray & lcG, const Evaluation & A, const modpk & bound, const Variable & x ); 741 841 … … 753 853 754 854 755 /* stuff included from . ./factory/cf_map.h */855 /* stuff included from ./cf_map.h */ 756 856 757 857 … … 789 889 CanonicalForm subst () const { return S; } 790 890 #ifndef NOSTREAMIO 791 friend ostream & operator << ( ostream & s, const MapPair & p ); 891 void print( OSTREAM&) const; 892 friend OSTREAM & operator << ( OSTREAM & s, const MapPair & p ); 792 893 #endif /* NOSTREAMIO */ 793 894 }; … … 827 928 CanonicalForm operator () ( const CanonicalForm & f ) const; 828 929 #ifndef NOSTREAMIO 829 friend ostream & operator << ( ostream& s, const CFMap & m );930 friend OSTREAM & operator << ( OSTREAM & s, const CFMap & m ); 830 931 #endif /* NOSTREAMIO */ 831 932 }; … … 837 938 838 939 839 /* stuff included from . ./factory/cf_reval.h */940 /* stuff included from ./cf_reval.h */ 840 941 841 942 … … 856 957 #ifdef SINGULAR 857 958 858 /* stuff included from . ./factory/gfops.h */959 /* stuff included from ./gfops.h */ 859 960 860 961 … … 864 965 865 966 866 /* stuff included from . ./factory/singext.h */967 /* stuff included from ./singext.h */ 867 968 868 969 … … 871 972 MP_INT gmp_denominator ( const CanonicalForm & f ); 872 973 974 int gf_value (const CanonicalForm & f ); 975 873 976 CanonicalForm make_cf ( const MP_INT & n ); 874 977 875 978 CanonicalForm make_cf ( const MP_INT & n, const MP_INT & d, bool normalize ); 876 979 980 CanonicalForm make_cf_from_gf ( const int z ); 981 877 982 878 983 #endif /* SINGULAR */ 879 984 985 #ifdef HAVE_BIFAC 986 /* stuff included from ./bifac.h */ 987 988 989 CFFList AbsFactorize( const CanonicalForm & a ); 990 991 class BIFAC 992 { 993 //////////////////////////////////////////////////////////////// 994 public: 995 //////////////////////////////////////////////////////////////// 996 997 // === KONST-/ DESTRUKTOREN ==== 998 BIFAC ( void ); // Konstruktor 999 virtual ~BIFAC( void ); // DESTRUKTOR 1000 1001 // === Funktionen ======= 1002 void bifac(CanonicalForm f, bool absolute=true); 1003 CFFList getFactors( void ){ return gl_RL; }; 1004 1005 1006 //////////////////////////////////////////////////////////////// 1007 private: 1008 //////////////////////////////////////////////////////////////// 1009 1010 // === Funktionen ======= 1011 void passedTime(); 1012 void biGanzMachen( CanonicalForm & f ); 1013 void biNormieren( CanonicalForm & f ) ; 1014 void convertResult( CanonicalForm & f, int ch, int sw); 1015 int findCharacteristic(CanonicalForm f); 1016 // void matrix_drucken( CFMatrix M ); 1017 long int anz_terme( CanonicalForm & f ); 1018 1019 CFList matrix2basis(CFMatrix A, int dim, int m, int n, CanonicalForm f); 1020 CFList basisOfG(CanonicalForm f); 1021 CFMatrix createA (CFList G, CanonicalForm f); 1022 CanonicalForm create_g (CFList G); 1023 CFList createRg (CFList G, CanonicalForm f); 1024 CFList createEg (CFList G, CanonicalForm f); 1025 CFList createEgUni (CFList G, CanonicalForm f); 1026 1027 void unifac(CanonicalForm f, int grad); 1028 CanonicalForm RationalFactor (CanonicalForm phi, CanonicalForm f, \ 1029 CanonicalForm fx, CanonicalForm g); 1030 void RationalFactorizationOnly (CFFList Phis, CanonicalForm f, CanonicalForm g); 1031 CFList getAbsoluteFactors (CanonicalForm f1, CanonicalForm phi); 1032 void AbsoluteFactorization (CFFList Phis, CanonicalForm f, CanonicalForm g); 1033 void bifacSqrFree( CanonicalForm f ); 1034 void bifacMain(CanonicalForm f); 1035 1036 1037 // === Variable ======= 1038 CFFList gl_RL; // where to store the rational factorization 1039 CFList gl_AL; // where to store the absolute factorization 1040 bool absolute; // Compute an absolute factorization as well? 1041 int exponent; // 1042 }; 1043 1044 #endif /* HAVE_BIFAC */ 1045 880 1046 #endif /* ! INCL_FACTORY_H */ -
factory/winnt/factoryconf.h
rb1d37f r49f1f45 1 /* ../factory/winnt/factoryconf.h automatically generated by makeheader from ../factory/factoryconf.template */1 /* winnt/factoryconf.h automatically generated by makeheader from factoryconf.template */ 2 2 /* emacs edit mode for this file is -*- C -*- */ 3 /* $Id: factoryconf.h,v 1. 5 1997-12-09 16:37:58 schmidtExp $ */3 /* $Id: factoryconf.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ 4 4 5 5 #ifndef INCL_FACTORYCONF_H … … 20 20 /* }}} */ 21 21 22 /* stuff included from . ./factory/winnt/config.h */22 /* stuff included from ./winnt/config.h */ 23 23 24 24 /* emacs edit mode for this file is -*- C -*- */ 25 /* $Id: factoryconf.h,v 1. 5 1997-12-09 16:37:58 schmidtExp $ */25 /* $Id: factoryconf.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ 26 26 27 27 #ifndef INCL_CONFIG_H … … 102 102 #endif /* ! INCL_CONFIG_H */ 103 103 104 /* stuff included from . ./factory/assert.h */104 /* stuff included from ./assert.h */ 105 105 106 106 /* emacs edit mode for this file is -*- C -*- */ 107 /* $Id: factoryconf.h,v 1. 5 1997-12-09 16:37:58 schmidtExp $ */107 /* $Id: factoryconf.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ 108 108 109 109 /* This is for compatibility with standard assert.h */ … … 134 134 /* }}} */ 135 135 136 #ifdef __cplusplus 137 extern "C" { 138 #endif 139 136 140 #include <stdio.h> 137 141 #include <stdlib.h> 142 143 #ifdef __cplusplus 144 } 145 #endif 138 146 139 147 /* {{{ permanent macro definitions */
Note: See TracChangeset
for help on using the changeset viewer.