Changeset 4b5c87 in git
- Timestamp:
- Apr 22, 1998, 9:49:05 AM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 22f80af1b6c1526efe5d3aa6f9cfa5ee2ac42a1c
- Parents:
- 6ca22e864c938665093be3c3244ede1ba10be59d
- Location:
- Singular
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ChangeLog
r6ca22e r4b5c87 1 Wed Apr 22 09:42:35 MET DST 1998 hannes 2 * several changes concerning stdfac 3 (kstdfac.cc, kutil.cc kutil.h) 4 1 5 Tue Apr 21 15:19:10 MET DST 1998 hannes/jens 2 6 * gdc in Q(a) returns "not implemented" (clapsing.cc) -
Singular/febase.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.cc,v 1. 29 1998-04-15 16:44:58Singular Exp $ */4 /* $Id: febase.cc,v 1.30 1998-04-22 07:48:52 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: i/o system … … 403 403 404 404 extern "C" { 405 void WerrorS(c har *s)405 void WerrorS(const char *s) 406 406 { 407 407 #ifdef HAVE_MPSR … … 412 412 feErrors=(char *)Alloc(256); 413 413 feErrorsLen=256; 414 strcpy(feErrors, s);414 strcpy(feErrors,(char *)s); 415 415 } 416 416 else 417 417 { 418 if (((int)(strlen( s)+strlen(feErrors)))>=feErrorsLen)418 if (((int)(strlen((char *)s)+strlen(feErrors)))>=feErrorsLen) 419 419 { 420 420 feErrors=(char *)ReAlloc(feErrors,feErrorsLen,feErrorsLen+256); 421 421 feErrorsLen+=256; 422 422 } 423 strcat(feErrors, s);423 strcat(feErrors,(char *)s); 424 424 } 425 425 strcat(feErrors,"\n"); … … 431 431 if (tclmode) 432 432 { 433 //PrintTCLS('E', s);433 //PrintTCLS('E',(char *)s); 434 434 //PrintTCLS('E',"\n"); 435 PrintTCLS('N', s);435 PrintTCLS('N',(char *)s); 436 436 PrintTCLS('N',"\n"); 437 437 } … … 440 440 { 441 441 fwrite(" ? ",1,5,stderr); 442 fwrite( s,1,strlen(s),stderr);442 fwrite((char *)s,1,strlen((char *)s),stderr); 443 443 fwrite("\n",1,1,stderr); 444 444 fflush(stderr); … … 446 446 { 447 447 fwrite(" ? ",1,5,feProtFile); 448 fwrite( s,1,strlen(s),feProtFile);448 fwrite((char *)s,1,strlen((char *)s),feProtFile); 449 449 fwrite("\n",1,1,feProtFile); 450 450 } -
Singular/febase.h
r6ca22e r4b5c87 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: febase.h,v 1.1 2 1998-04-15 16:44:57Singular Exp $ */6 /* $Id: febase.h,v 1.13 1998-04-22 07:48:53 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 41 41 42 42 void Werror(char *fmt, ...); 43 void WerrorS(c har *s);43 void WerrorS(const char *s); 44 44 45 45 #ifdef __cplusplus -
Singular/ideals.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.2 1 1998-04-14 15:26:12Singular Exp $ */4 /* $Id: ideals.cc,v 1.22 1998-04-22 07:48:54 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 422 422 if (h1==NULL) return idCopy(h2); 423 423 if (h2==NULL) return idCopy(h1); 424 j = IDELEMS(h1); 425 while ((j > 0) && (h1->m[j-1] == NULL)) j--; 426 i = IDELEMS(h2); 427 while ((i > 0) && (h2->m[i-1] == NULL)) i--; 428 if (i+j==0) 429 result = idInit(1,1); 424 j = IDELEMS(h1)-1; 425 while ((j >= 0) && (h1->m[j] == NULL)) j--; 426 i = IDELEMS(h2)-1; 427 while ((i >= 0) && (h2->m[i] == NULL)) i--; 428 r = max(h1->rank,h2->rank); 429 if (i+j==(-2)) 430 return idInit(1,r); 430 431 else 431 result=idInit(i+j,1); 432 if (h1->rank<h2->rank) 433 result->rank = h2->rank; 434 else 435 result->rank = h1->rank; 436 if (i+j==0) return result; 437 r = 0; 438 for (l=0; l<j; l++) 439 { 440 result->m[r] = pCopy(h1->m[l]); 441 r++; 442 } 443 for (l=0; l<i; l++) 432 result=idInit(i+j+2,r); 433 for (l=j; l>=0; l--) 434 { 435 result->m[l] = pCopy(h1->m[l]); 436 } 437 r = i+j+1; 438 for (l=i; l>=0; l--, r--) 444 439 { 445 440 result->m[r] = pCopy(h2->m[l]); 446 r++;447 441 } 448 442 return result; … … 2370 2364 2371 2365 result=idCopy(id); 2372 i = 0;2373 while ((! b) && (i <IDELEMS(result)))2366 i = IDELEMS(result)-1; 2367 while ((! b) && (i>=0)) 2374 2368 { 2375 2369 b=pIsUnit(result->m[i]); 2376 i ++;2370 i--; 2377 2371 } 2378 2372 if (b) 2379 2373 { 2380 for (i= 0;i<IDELEMS(result);i++)2374 for (i=IDELEMS(result)-1;i>=0;i--) 2381 2375 pDelete(&result->m[i]); 2382 2376 result->m[0]=pOne(); … … 2435 2429 int i; 2436 2430 2437 for (i= 0; i< IDELEMS(h); i++)2438 { 2439 if (h->m[i] ) m->m[i]=pHead(h->m[i]);2431 for (i=IDELEMS(h)-1;i>=0; i--) 2432 { 2433 if (h->m[i]!=NULL) m->m[i]=pHead(h->m[i]); 2440 2434 } 2441 2435 return m; … … 2447 2441 int i; 2448 2442 2449 for (i= 0; i< IDELEMS(h); i++)2443 for (i=IDELEMS(h)-1;i>=0; i--) 2450 2444 { 2451 2445 m->m[i]=pHomogen(h->m[i],varnum); -
Singular/iparith.cc
r6ca22e r4b5c87 1491 1491 return FALSE; 1492 1492 } 1493 WerrorS( "not implemented yet");1493 WerrorS(feNotImplemented); 1494 1494 delete iv; 1495 1495 return TRUE; … … 3104 3104 #ifdef HAVE_FGLM 3105 3105 ,{findUniProc, FINDUNI_CMD, IDEAL_CMD, IDEAL_CMD} 3106 #else 3106 #else 3107 3107 ,{jjWRONG, FINDUNI_CMD, IDEAL_CMD, IDEAL_CMD} 3108 #endif 3108 #endif 3109 3109 ,{jjidFreeModule,FREEMODULE_CMD, XS(MODUL_CMD), INT_CMD } 3110 3110 #ifdef HAVE_FACTORY -
Singular/ipshell.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipshell.cc,v 1. 19 1998-04-08 21:14:57 krueger Exp $ */4 /* $Id: ipshell.cc,v 1.20 1998-04-22 07:48:59 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 690 690 else 691 691 { 692 //if (name->rtyp!=0) 693 //{ 694 // Warn("`%s` is already in use",name->name); 695 //} 692 696 sy->data = (char *)enterid(name->name,lev,t,root,init_b); 693 697 if (sy->data!=NULL) -
Singular/kstdfac.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstdfac.cc,v 1.1 6 1998-04-08 16:04:24Singular Exp $ */4 /* $Id: kstdfac.cc,v 1.17 1998-04-22 07:49:00 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: factorizing alg. of Buchberger … … 464 464 } 465 465 /* reduction of the element choosen from L */ 466 if (strat->P.p != NULL) 467 strat->red(&strat->P,strat); 466 strat->red(&strat->P,strat); 468 467 if (strat->P.p != NULL) 469 468 { … … 496 495 if ((IDELEMS(fac)==1)&&(facdeg==pFDeg(fac->m[0]))) 497 496 { 498 pDelete(&(fac->m[0])); 499 fac->m[0]=strat->P.p; 497 if (TEST_OPT_INTSTRATEGY) 498 { 499 if (!TEST_OPT_MINRES||(strat->syzComp==0)||(!strat->homog)) 500 { 501 strat->P.p = redtailBba(strat->P.p,strat->sl,strat); 502 if (strat->redTailChange) pCleardenom(strat->P.p); 503 } 504 } 505 else 506 { 507 pNorm(strat->P.p); 508 if (!TEST_OPT_MINRES||(strat->syzComp==0)||(!strat->homog)) 509 { 510 strat->P.p = redtailBba(strat->P.p,strat->sl,strat); 511 } 512 } 513 if (strat->redTailChange) 514 { 515 idDelete(&fac); 516 fac=singclap_factorize(strat->P.p,NULL,1); 517 #ifndef HAVE_LIBFAC_P 518 if (fac==NULL) 519 { 520 fac=idInit(1,1); 521 fac->m[0]=pCopy(strat->P.p); 522 } 523 #endif 524 idDelete(&fac_copy); 525 fac_copy=idInit(IDELEMS(fac),1); 526 } 527 if ((IDELEMS(fac)==1)&&(facdeg==pFDeg(fac->m[0]))) 528 { 529 pDelete(&(fac->m[0])); 530 fac->m[0]=strat->P.p; 531 } 500 532 } 501 533 if (strat->P.lcm!=NULL) pFree1(strat->P.lcm); 502 534 int i; 503 for(i=0;i<IDELEMS(fac);i++) 504 { 505 int pos; 506 if (strat->sl==-1) pos=0; 507 else pos=posInS(strat->S,strat->sl,fac->m[i]); 508 if (TEST_OPT_INTSTRATEGY) 509 { 510 if (!TEST_OPT_MINRES||(strat->syzComp==0)||(!strat->homog)) 511 { 512 fac->m[i] = redtailBba(fac->m[i],pos-1,strat); 513 pCleardenom(fac->m[i]); 514 } 515 } 516 else 517 { 518 pNorm(fac->m[i]); 519 if (!TEST_OPT_MINRES||(strat->syzComp==0)||(!strat->homog)) 520 { 521 fac->m[i] = redtailBba(fac->m[i],pos-1,strat); 522 } 523 } 524 facdeg=pFDeg(fac->m[i]); 525 ideal fac2=singclap_factorize(fac->m[i],NULL,1); 526 #ifndef HAVE_LIBFAC_P 527 if ((fac2!=NULL)&&(IDELEMS(fac2)>1)&&(facdeg!=pFDeg(fac2->m[0]))) 528 #else 529 if ((IDELEMS(fac2)>1)&&(facdeg!=pFDeg(fac2->m[0]))) 530 #endif 531 { 532 if (TEST_OPT_DEBUG) 533 { 534 wrp(fac->m[i]); 535 Print("-> %d factors, again\n",IDELEMS(fac2)); 536 //jjPRINT_MA0((matrix)fac2,""); 537 } 538 else if (TEST_OPT_PROT) 539 { 540 int ii=IDELEMS(fac2); 541 if (ii>1) 542 { 543 while(ii>0) { PrintS("F"); ii--; } 544 } 545 } 546 pDelete(&(fac->m[i])); 547 fac->m[i]=fac2->m[0]; 548 pEnlargeSet(&(fac->m),IDELEMS(fac),IDELEMS(fac2)-1); 549 pEnlargeSet(&(fac_copy->m),IDELEMS(fac),IDELEMS(fac2)-1); 550 memcpy(fac->m+IDELEMS(fac),&(fac2->m[1]),(IDELEMS(fac2)-1)*sizeof(poly 551 )); 552 IDELEMS(fac)+=(IDELEMS(fac2)-1); 553 IDELEMS(fac_copy)=IDELEMS(fac); 554 } 555 } 535 // for(i=0;i<IDELEMS(fac);i++) 536 // { 537 // int pos; 538 // if (strat->sl==-1) pos=0; 539 // else pos=posInS(strat->S,strat->sl,fac->m[i]); 540 // if (TEST_OPT_INTSTRATEGY) 541 // { 542 // if (!TEST_OPT_MINRES||(strat->syzComp==0)||(!strat->homog)) 543 // { 544 // fac->m[i] = redtailBba(fac->m[i],pos-1,strat); 545 // pCleardenom(fac->m[i]); 546 // } 547 // } 548 // else 549 // { 550 // pNorm(fac->m[i]); 551 // if (!TEST_OPT_MINRES||(strat->syzComp==0)||(!strat->homog)) 552 // { 553 // fac->m[i] = redtailBba(fac->m[i],pos-1,strat); 554 // } 555 // } 556 // } 556 557 557 558 for(i=IDELEMS(fac)-1;i>=0;i--) … … 573 574 if (n->sl==-1) pos=0; 574 575 else pos=posInS(n->S,n->sl,n->P.p); 576 575 577 // we have already reduced all elements from fac.... 576 //if (TEST_OPT_INTSTRATEGY) 577 //{ 578 // if (!TEST_OPT_MINRES||(n->syzComp==0)||(!n->homog)) 579 // { 580 // n->P.p = redtailBba(n->P.p,pos-1,n); 581 // pCleardenom(n->P.p); 582 // } 583 //} 584 //else 585 //{ 586 // pNorm(n->P.p); 587 // if (!TEST_OPT_MINRES||(n->syzComp==0)||(!n->homog)) 588 // { 589 // n->P.p = redtailBba(n->P.p,pos-1,n); 590 // } 591 //} 592 if (TEST_OPT_DEBUG) 593 { 594 PrintS("new s:"); 595 wrp(n->P.p); 596 PrintLn(); 597 } 598 enterpairs(n->P.p,n->sl,n->P.ecart,pos,n); 599 n->enterS(n->P,pos,n); 600 if (n->sl>srmax) srmax = n->sl; 601 602 /* enter P.p into T */ 603 if ((IDELEMS(fac)>1)||(facdeg!=pFDeg(fac->m[0]))) 604 { 605 int pos=n->posInT(n->T,n->tl,n->P); 606 enterTBba(n->P,pos,n); 607 } 578 if (TEST_OPT_INTSTRATEGY) 579 { 580 if (!TEST_OPT_MINRES||(n->syzComp==0)||(!n->homog)) 581 { 582 n->P.p = redtailBba(n->P.p,pos-1,n); 583 if (n->redTailChange) pCleardenom(n->P.p); 584 } 585 } 586 else 587 { 588 pNorm(n->P.p); 589 if (!TEST_OPT_MINRES||(n->syzComp==0)||(!n->homog)) 590 { 591 n->P.p = redtailBba(n->P.p,pos-1,n); 592 } 593 } 594 595 //if (n->redTailChange) 596 //{ 597 // int pos = n->posInL(n->L,n->Ll,n->P,n); 598 // enterL(&n->L,&n->Ll,&n->Lmax,n->P,pos); 599 //} 600 //else 601 { 602 if (TEST_OPT_DEBUG) 603 { 604 PrintS("new s:"); 605 wrp(n->P.p); 606 PrintLn(); 607 } 608 enterpairs(n->P.p,n->sl,n->P.ecart,pos,n); 609 n->enterS(n->P,pos,n); 610 if (n->sl>srmax) srmax = n->sl; 611 612 /* enter P.p into T */ 613 if ((IDELEMS(fac)>1)||(facdeg!=pFDeg(fac->m[0]))) 614 { 615 int pos=n->posInT(n->T,n->tl,n->P); 616 enterTBba(n->P,pos,n); 617 } 618 } 608 619 609 620 /* construct D */ … … 651 662 messageSets(n); 652 663 } 664 //if (n->Ll >=0) Print("Ll:%d|",n->Ll); 653 665 while (n->Ll >= 0) deleteInL(n->L,&n->Ll,n->Ll,n); 666 //if (n->tl >=0) Print("tl:%d|",n->tl); 654 667 while (n->tl >= 0) { pDelete(&n->T[n->tl].p); n->tl--; } 655 668 memset(n->Shdl->m,0,IDELEMS(n->Shdl)*sizeof(poly)); -
Singular/kutil.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.1 6 1998-04-08 16:04:25Singular Exp $ */4 /* $Id: kutil.cc,v 1.17 1998-04-22 07:49:01 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for std … … 449 449 /*- tail belongs to several int spolys -*/ 450 450 } 451 else 451 else 452 452 { 453 453 // search p in T, if it is there, do not delete it 454 454 int i=strat->tl; 455 455 poly p=set[j].p; 456 while (i>=0) 457 { 458 if (strat->T[i].p==p) 456 if (p!=NULL) 457 loop 458 { 459 if (i < 0) 459 460 { 460 p=NULL; 461 break; 461 //if (strat->next!=NULL) 462 //{ 463 // strat=strat->next; 464 // i=strat->tl; 465 //} 466 //else 467 { 468 /* not found : */ 469 pDelete(&p); 470 break; 471 } 462 472 } 463 i--; 464 } 465 if (p!=NULL) pDelete(&p); 466 set[j].p=NULL; 467 } 473 else 474 { 475 if (strat->T[i].p==p) 476 { 477 /* found : */ 478 p=NULL; 479 break; 480 } 481 i--; 482 } 483 } 484 } 485 set[j].p=NULL; 468 486 } 469 487 if ((*length)>0) … … 2311 2329 poly h, hn; 2312 2330 int j; 2331 strat->redTailChange=FALSE; 2313 2332 2314 2333 if (strat->noTailReduction) … … 2325 2344 if (pDivisibleBy(strat->S[j], hn)) 2326 2345 { 2346 strat->redTailChange=TRUE; 2327 2347 spSpolyTail(strat->S[j], p, h, strat->kNoether, strat->spSpolyLoop); 2328 2348 hn = pNext(h); … … 3826 3846 { 3827 3847 rOrderType_t rot = rGetOrderType(r); 3828 3848 3829 3849 if ((rot == rOrderType_CompExp || rot == rOrderType_ExpComp) && 3830 3850 (modrank == 0)) … … 3835 3855 } 3836 3856 3837 3857 -
Singular/kutil.h
r6ca22e r4b5c87 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: kutil.h,v 1. 7 1998-04-06 17:59:33 obachmanExp $ */6 /* $Id: kutil.h,v 1.8 1998-04-22 07:49:02 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: kernel: utils for std … … 103 103 int lastAxis; 104 104 int newIdeal; 105 int minim; 105 106 BOOLEAN interpt; 106 107 BOOLEAN homog; 107 BOOLEAN news;108 BOOLEAN newt;/*used for messageSets*/109 108 BOOLEAN kHEdgeFound; 110 109 BOOLEAN honey,sugarCrit; … … 115 114 BOOLEAN posInLOldFlag; 116 115 /*FALSE, if posInL == posInL10*/ 117 int minim; 116 char redTailChange; 117 char news; 118 char newt;/*used for messageSets*/ 118 119 }; 119 120 -
Singular/longalg.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longalg.cc,v 1.2 1 1998-04-21 10:59:24 obachmanExp $ */4 /* $Id: longalg.cc,v 1.22 1998-04-22 07:49:04 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: algebraic numbers … … 1334 1334 alg x; 1335 1335 1336 mmTestP(a,sizeof(rnumber)); 1337 mmTestP(b,sizeof(rnumber)); 1338 naTest(la); 1339 naTest(lb); 1340 1336 1341 lo = (lnumber)Alloc(sizeof(rnumber)); 1337 1342 lo->z = napMult(napCopy(a->z), napCopy(b->z)); 1338 naTest(la); 1339 naTest(lb); 1343 1340 1344 if (a->n==NULL) 1341 1345 { … … 1386 1390 lo=NULL; 1387 1391 } 1388 naTest(la);1389 naTest(lb);1390 1392 naTest((number)lo); 1391 1393 return (number)lo; … … 1988 1990 napDelete(&x); 1989 1991 napDelete(&y); 1990 } 1992 } 1991 1993 } 1992 1994 #endif -
Singular/matpol.cc
r6ca22e r4b5c87 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: matpol.cc,v 1.1 0 1998-04-08 16:04:29Singular Exp $ */4 /* $Id: matpol.cc,v 1.11 1998-04-22 07:49:05 Singular Exp $ */ 5 5 6 6 /* … … 350 350 // lists res=(lists)Alloc(sizeof(slists)); 351 351 352 if (sw) PrintS( "not implemented");352 if (sw) PrintS(feNotImplemented); 353 353 /* Bareiss */ 354 354 div = NULL;
Note: See TracChangeset
for help on using the changeset viewer.