Changeset e1b9f91 in git
- Timestamp:
- Oct 20, 1999, 1:52:03 PM (25 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 26deb2c404b8f17c872722c09abd1355337a0287
- Parents:
- 30ff807d4b57c77ac10958c9dff99ebf16018415
- Location:
- Singular
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ideals.cc
r30ff80 re1b9f91 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.6 5 1999-10-20 07:31:58 siebertExp $ */4 /* $Id: ideals.cc,v 1.66 1999-10-20 11:52:00 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 1522 1522 1523 1523 ideal s_h3=idPrepare(s_h1,s_quot,h,k,"gen,&i,&w); 1524 ideal s_h2 = idInit(IDELEMS(s_h3), s_h3->rank); 1524 1525 1525 1526 if (w!=NULL) delete w; 1526 1527 i = 0; 1527 for (j=0;j<IDELEMS(s_h3);j++) 1528 { 1529 if ((s_h3->m[j] != NULL) && (pMinComp(s_h3->m[j]) <= k)) 1528 for (j=0; j<IDELEMS(s_h3); j++) 1529 { 1530 if ((s_h3->m[j] != NULL) && (pMinComp(s_h3->m[j],syz_ring) <= k)) 1531 { 1530 1532 i++; 1531 } 1532 j = IDELEMS(s_h1); 1533 if (s_quot!=NULL) idDelete(&s_quot); 1534 1535 if (syz_ring!=orig_ring) 1536 rChangeCurrRing(orig_ring,TRUE); 1537 pSetSyzComp(0); 1538 1539 idDelete((ideal*)ma); 1540 *ma = mpNew(j,i); 1541 i = -1; 1542 ideal e=idInit(16,h1->rank); 1543 for (j=0; j<IDELEMS(s_h3); j++) 1544 { 1545 if ((s_h3->m[j] != NULL) && (pMinComp(s_h3->m[j],syz_ring) <= k)) 1546 { 1547 if (syz_ring==orig_ring) 1548 q = pCopy(s_h3->m[j]); 1549 else 1550 q = pPermPoly(s_h3->m[j],NULL,syz_ring,NULL,0); 1551 qq=q; 1533 q = s_h3->m[j]; 1552 1534 while (pNext(q) != NULL) 1553 1535 { 1554 1536 if (pGetComp(pNext(q)) > k) 1555 1537 { 1556 p = pNext(q); 1557 pNext(q) = pNext(pNext(q)); 1558 pNext(p) = NULL; 1559 t=pGetComp(p); 1560 pSetComp(p,0); 1561 pSetmComp(p); 1562 MATELEM(*ma,t-k,i+2) = pAdd(MATELEM(*ma,t-k,i+2),p); 1538 s_h2->m[j] = pNext(q); 1539 pNext(q) = NULL; 1563 1540 } 1564 1541 else … … 1567 1544 } 1568 1545 } 1569 if (!inputIsIdeal) pShift(&qq,-1); 1570 q = qq; 1571 if (q !=NULL) 1572 { 1573 i++; 1574 if (i+1 >= IDELEMS(e)) 1575 { 1576 pEnlargeSet(&(e->m),IDELEMS(e),16); 1577 IDELEMS(e) += 16; 1578 } 1579 e->m[i] = q; 1580 } 1581 } 1582 } 1583 if (syz_ring==orig_ring) 1584 idDelete(&s_h3); 1585 else 1586 { 1587 rChangeCurrRing(syz_ring,FALSE); 1588 idDelete(&s_h3); 1546 if (!inputIsIdeal) pShift(&(s_h3->m[j]), -1); 1547 } 1548 else 1549 { 1550 pDelete(&(s_h3->m[j])); 1551 } 1552 } 1553 1554 idSkipZeroes(s_h3); 1555 j = IDELEMS(s_h1); 1556 if (s_quot!=NULL) idDelete(&s_quot); 1557 1558 if (syz_ring!=orig_ring) 1589 1559 rChangeCurrRing(orig_ring,TRUE); 1590 rKill(syz_ring); 1591 } 1592 idSkipZeroes(e); 1593 return e; 1560 pSetSyzComp(0); 1561 idDelete((ideal*)ma); 1562 *ma = mpNew(j,i); 1563 1564 i = 1; 1565 for (j=0; j<IDELEMS(s_h2); j++) 1566 { 1567 if (s_h2->m[j] != NULL) 1568 { 1569 q = pFetchCopyDelete(syz_ring, s_h2->m[j]); 1570 s_h2->m[j] = NULL; 1571 1572 while (q != NULL) 1573 { 1574 p = q; 1575 pIter(q); 1576 pNext(p) = NULL; 1577 t=pGetComp(p); 1578 pSetComp(p,0); 1579 pSetmComp(p); 1580 MATELEM(*ma,t-k,i) = pAdd(MATELEM(*ma,t-k,i),p); 1581 } 1582 i++; 1583 } 1584 } 1585 idDelete(&s_h2); 1586 1587 for (i=0; i<IDELEMS(s_h3); i++) 1588 { 1589 s_h3->m[i] = pFetchCopyDelete(syz_ring, s_h3->m[i]); 1590 } 1591 1592 if (syz_ring!=orig_ring) rKill(syz_ring); 1593 return s_h3; 1594 1594 } 1595 1595 -
Singular/kutil.cc
r30ff80 re1b9f91 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.4 3 1999-10-19 12:42:45obachman Exp $ */4 /* $Id: kutil.cc,v 1.44 1999-10-20 11:52:01 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 3063 3063 redSi=pHead((strat->S)[i]); 3064 3064 (strat->S)[i] = redMora((strat->S)[i],i-1,strat); 3065 kTest(strat);3066 3065 if ((strat->S)[i]==NULL) 3067 3066 { … … 3090 3089 strat->sevS[i] = h.sev; 3091 3090 } 3091 kTest(strat); 3092 3092 } 3093 3093 i++; -
Singular/polys.cc
r30ff80 re1b9f91 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys.cc,v 1.5 0 1999-10-19 12:42:47obachman Exp $ */4 /* $Id: polys.cc,v 1.51 1999-10-20 11:52:02 obachman Exp $ */ 5 5 6 6 /* … … 474 474 case ringorder_C: 475 475 case ringorder_S: 476 case ringorder_s: 476 477 break; 477 478 case ringorder_a: … … 696 697 firstwv=NULL; 697 698 polys_wv=r->wvhdl; 698 if (order[0]==ringorder_S )699 if (order[0]==ringorder_S ||order[0]==ringorder_s) 699 700 { 700 701 order++; … … 711 712 /*======== ordering type is (_,c) =========================*/ 712 713 if ((order[0]==ringorder_unspec) 713 ||( 714 ((order[1]==ringorder_c)||(order[1]==ringorder_C)||(order[1]==ringorder_S)) 714 ||( 715 ((order[1]==ringorder_c)||(order[1]==ringorder_C) 716 ||(order[1]==ringorder_S) 717 ||(order[1]==ringorder_s)) 715 718 && (order[0]!=ringorder_M) 716 719 && (order[2]==0)) 717 )720 ) 718 721 { 719 722 if ((order[0]!=ringorder_unspec) 720 && ((order[1]==ringorder_C)||(order[1]==ringorder_S))) 723 && ((order[1]==ringorder_C)||(order[1]==ringorder_S)|| 724 (order[1]==ringorder_s))) 721 725 pComponentOrder=-1; 722 726 if (pOrdSgn == -1) pLDeg = ldeg0c; … … 733 737 /*======== ordering type is (c,_) =========================*/ 734 738 else if (((order[0]==ringorder_c) 735 ||(order[0]==ringorder_C) 736 ||(order[0]==ringorder_S)) 739 ||(order[0]==ringorder_C) 740 ||(order[0]==ringorder_S) 741 ||(order[0]==ringorder_s)) 737 742 && (order[1]!=ringorder_M) 738 743 && (order[2]==0)) 739 744 { 740 745 /* pLDeg = ldeg0; is standard*/ 741 if ((order[0]==ringorder_C)||(order[0]==ringorder_S)) 746 if ((order[0]==ringorder_C)||(order[0]==ringorder_S)|| 747 order[0]==ringorder_s) 742 748 pComponentOrder=-1; 743 749 if ((order[1] == ringorder_lp) || (order[1] == ringorder_ls)) … … 758 764 //pLexOrder=TRUE; 759 765 pVectorOut=order[0]==ringorder_c; 760 if ((pVectorOut)||(order[0]==ringorder_C)||(order[0]==ringorder_S) )766 if ((pVectorOut)||(order[0]==ringorder_C)||(order[0]==ringorder_S)||(order[0]==ringorder_s)) 761 767 { 762 768 if(block1[1]!=pVariables) pLexOrder=TRUE; … … 779 785 780 786 if ((order[0]!=ringorder_c) 781 &&(order[0]!=ringorder_C) 782 &&(order[0]!=ringorder_S)) 787 && (order[0]!=ringorder_C) 788 && (order[0]!=ringorder_S) 789 && (order[0]!=ringorder_s)) 783 790 { 784 791 pLDeg = ldeg1c; -
Singular/syz.h
r30ff80 re1b9f91 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: syz.h,v 1.2 0 1999-10-19 12:42:49obachman Exp $ */6 /* $Id: syz.h,v 1.21 1999-10-20 11:52:02 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT: Resolutions … … 53 53 intvec * cw; 54 54 intvec * betti; 55 short list_length;56 short references;57 55 kBucket_pt bucket; 58 56 kBucket_pt syz_bucket; 59 57 ring syRing; 60 int length;61 58 resolvente fullres; 62 59 resolvente minres; 60 unsigned long ** sev; 61 int length; 62 short list_length; 63 short references; 63 64 }; 64 65 -
Singular/syz1.cc
r30ff80 re1b9f91 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: syz1.cc,v 1.4 3 1999-10-19 12:42:49obachman Exp $ */4 /* $Id: syz1.cc,v 1.44 1999-10-20 11:52:03 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: resolutions … … 872 872 (IDELEMS(syzstr->res[index])+1)*sizeof(int), 873 873 (IDELEMS(syzstr->res[index])+17)*sizeof(int)); 874 //Print("sort %d has now size %d\n",index,IDELEMS(res[index])+17); 874 syzstr->sev[index]=(unsigned long*)ReAlloc0((ADDRESS)syzstr->sev[index], 875 (IDELEMS(syzstr->res[index])+1)*sizeof(unsigned long), 876 (IDELEMS(syzstr->res[index])+17)*sizeof(unsigned long)); 875 877 IDELEMS(syzstr->res[index]) += 16; 876 878 pEnlargeSet(&(syzstr->orderedRes[index]->m),IDELEMS(syzstr->orderedRes[index]),16); … … 1589 1591 syzstr->elemLength[index] = (int*)Alloc0(init*sizeof(int)); 1590 1592 syzstr->orderedRes[index] = idInit(init-1,1); 1593 syzstr->sev[index] = (unsigned long*) Alloc0(init*sizeof(unsigned long)); 1591 1594 result = 0; 1592 1595 } … … 1712 1715 Free((ADDRESS)syzstr->truecomponents,(syzstr->length+1)*sizeof(int*)); 1713 1716 Free((ADDRESS)syzstr->ShiftedComponents,(syzstr->length+1)*sizeof(long*)); 1717 if (syzstr->sev != NULL) 1718 Free(((ADDRESS)syzstr->sev), (syzstr->length+1)*sizeof(unsigned long*)); 1714 1719 Free((ADDRESS)syzstr->backcomponents,(syzstr->length+1)*sizeof(int*)); 1715 1720 Free((ADDRESS)syzstr->Howmuch,(syzstr->length+1)*sizeof(int*)); … … 2724 2729 syzstr->Howmuch = (int**)Alloc0((*length+1)*sizeof(int*)); 2725 2730 syzstr->Firstelem = (int**)Alloc0((*length+1)*sizeof(int*)); 2731 syzstr->sev = (unsigned long **) Alloc0((*length+1)*sizeof(unsigned long *)); 2726 2732 syzstr->bucket = kBucketCreate(); 2727 2733 int len0=idRankFreeModule(arg)+1;
Note: See TracChangeset
for help on using the changeset viewer.