Changeset 3e7095 in git


Ignore:
Timestamp:
Oct 12, 2011, 6:20:44 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
c79a9d3a83d34151b67ba9ac3b63b827a07b792f
Parents:
41072b6ab29c5e0337b0ec5f62dd37acbe4eb0bd
Message:
option(qringNF)

git-svn-id: file:///usr/local/Singular/svn/trunk@14410 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    r41072b r3e7095  
    332332    res->data=(void*)p;
    333333    jiAssignAttr(res,a);
     334    if (TEST_V_QRING && (currQuotient!=NULL) && (!hasFlag(res,FLAG_QRING))) jjNormalizeQRingP(res);
    334335  }
    335336  else
     
    365366      m->rank=si_max(m->rank,pMaxComp(p));
    366367    }
    367   }
    368   //if ((TEST_V_QRING) && (currQuotient!=NULL)) jjNormalizeQRingP(res);
     368    if (TEST_V_QRING) jjNormalizeQRingP(res);
     369  }
    369370  return FALSE;
    370371}
     
    496497    setFlag(res,FLAG_STD);
    497498  }
    498   //if ((TEST_V_QRING) && (currQuotient!=NULL)) jjNormalizeQRingId(res);
     499  if (TEST_V_QRING && (currQuotient!=NULL)&& (!hasFlag(res,FLAG_QRING))) jjNormalizeQRingId(res);
    499500  return FALSE;
    500501}
     
    514515  pNormalize(I->m[0]);
    515516  res->data=(void *)I;
    516   //if ((TEST_V_QRING) && (currQuotient!=NULL)) jjNormalizeQRingId(res);
     517  if (TEST_V_QRING && (currQuotient!=NULL))
     518  {
     519    if (hasFlag(a,FLAG_QRING)) setFlag(res,FLAG_QRING);
     520    else                       jjNormalizeQRingId(res);
     521  }
    517522  return FALSE;
    518523}
     
    526531  idNormalize((ideal)m);
    527532  res->data=(void *)m;
    528   //if ((TEST_V_QRING) && (currQuotient!=NULL)) jjNormalizeQRingId(res);
     533  if (TEST_V_QRING && (currQuotient!=NULL)) jjNormalizeQRingId(res);
    529534  return FALSE;
    530535}
     
    968973  l1->CleanUp();
    969974  r->CleanUp();
    970   //if ((TEST_V_QRING) && (currQuotient!=NULL)) jjNormalizeQRingP(l);
     975  //if (TEST_V_QRING && (currQuotient!=NULL)) jjNormalizeQRingP(l);
    971976  return FALSE;
    972977}
     
    10481053      {
    10491054        Warn("expression list length(%d) does not match intmat size(%d)",
    1050               iv->length()+exprlist_length(hh),iv->length());
     1055              iv->length()+exprlist_length(hh),iv->length());
    10511056      }
    10521057      break;
     
    16571662    if (I->e==NULL)
    16581663    {
     1664      ideal I0=(ideal)I->Data();
     1665      switch (I->Typ())
     1666      {
     1667        case IDEAL_CMD:
     1668        case MODUL_CMD:
     1669        {
     1670          ideal F=idInit(1,1);
     1671          ideal II=kNF(F,currQuotient,I0);
     1672          idDelete(&F);
     1673          if (I->rtyp!=IDHDL)
     1674          {
     1675            idDelete((ideal*)&(I0));
     1676            I->data=II;
     1677          }
     1678          else
     1679          {
     1680            idhdl h=(idhdl)I->data;
     1681            idDelete((ideal*)&IDIDEAL(h));
     1682            IDIDEAL(h)=II;
     1683            setFlag(h,FLAG_QRING);
     1684          }
     1685          break;
     1686        }
     1687        default: break;
     1688      }
     1689      setFlag(I,FLAG_QRING);
     1690    }
     1691  }
     1692}
     1693void jjNormalizeQRingP(leftv I)
     1694{
     1695  if ((currQuotient!=NULL) && (!hasFlag(I,FLAG_QRING)))
     1696  {
     1697    poly p=(poly)I->Data();
     1698    if ((I->e==NULL) && (p!=NULL))
     1699    {
    16591700      ideal F=idInit(1,1);
    1660       ideal I0=(ideal)I->Data();
    1661       ideal II=kNF(F,currQuotient,I0);
    1662       idDelete(&F);
    1663       if ((I->rtyp==IDEAL_CMD)
    1664       || (I->rtyp==MODUL_CMD)
    1665       )
    1666       {
    1667         idDelete((ideal*)&(I0));
    1668         I->data=II;
    1669       }
    1670       else if (I->rtyp==IDHDL)
    1671       {
    1672         idhdl h=(idhdl)I->data;
    1673         idDelete((ideal*)&IDIDEAL(h));
    1674         IDIDEAL(h)=II;
    1675         setFlag(h,FLAG_QRING);
    1676       }
    1677       else
    1678       {
    1679         idDelete(&II);
    1680       }
    1681       setFlag(I,FLAG_QRING);
    1682     }
    1683   }
    1684 }
    1685 void jjNormalizeQRingP(leftv I)
    1686 {
    1687   if ((currQuotient!=NULL) && (!hasFlag(I,FLAG_QRING)))
    1688   {
    1689     if (I->e==NULL)
    1690     {
    1691       ideal F=idInit(1,1);
    1692       poly II=kNF(F,currQuotient,(poly)I->Data());
     1701      poly II=kNF(F,currQuotient,p);
    16931702      idDelete(&F);
    16941703      if ((I->rtyp==POLY_CMD)
    16951704      || (I->rtyp==VECTOR_CMD))
    16961705      {
    1697         pDelete((poly*)&(I->data));
     1706        pDelete(&p);
    16981707        I->data=II;
    16991708      }
    17001709      else if (I->rtyp==IDHDL)
    17011710      {
     1711        pDelete(&p);
    17021712        idhdl h=(idhdl)I->data;
    1703         pDelete((poly*)&IDPOLY(h));
    17041713        IDPOLY(h)=II;
    17051714        setFlag(h,FLAG_QRING);
     
    17091718        pDelete(&II);
    17101719      }
    1711       setFlag(I,FLAG_QRING);
    1712     }
     1720    }
     1721    setFlag(I,FLAG_QRING);
    17131722  }
    17141723}
  • Singular/subexpr.cc

    r41072b r3e7095  
    124124        case MODUL_CMD:
    125125        case IDEAL_CMD:
    126           if ((TEST_V_QRING)  &&(currQuotient!=NULL))
     126          if ((TEST_V_QRING)  &&(currQuotient!=NULL)
     127          &&(!hasFlag(this,FLAG_QRING)))
    127128          {
    128129            jjNormalizeQRingId(this);
     
    135136        case POLY_CMD:
    136137        case VECTOR_CMD:
    137           if ((TEST_V_QRING)  &&(currQuotient!=NULL))
     138          if ((TEST_V_QRING)  &&(currQuotient!=NULL)
     139          &&(!hasFlag(this,FLAG_QRING)))
    138140          {
    139141            jjNormalizeQRingP(this);
Note: See TracChangeset for help on using the changeset viewer.