Changeset bafe9c in git for Singular/ipassign.cc


Ignore:
Timestamp:
Apr 1, 2008, 6:32:40 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9676ea20c5b413901217dc054c67c5e9b03a512a
Parents:
bcfdafa7e446687dbf7583be1d7a09ab1a9152d9
Message:
*hannes: fix qring in qring


git-svn-id: file:///usr/local/Singular/svn/trunk@10657 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    rbcfdafa rbafe9c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipassign.cc,v 1.95 2008-04-01 15:21:47 Singular Exp $ */
     4/* $Id: ipassign.cc,v 1.96 2008-04-01 16:32:40 Singular Exp $ */
    55
    66/*
     
    155155      }
    156156    }
    157     default: 
     157    default:
    158158    //case RESOLUTION_CMD:
    159159       Werror("type %d too complex...set minpoly before",IDTYP(h)); break;
     
    521521  return FALSE;
    522522}
    523 #if 0
    524523static BOOLEAN jiA_QRING(leftv res, leftv a,Subexpr e)
    525524{
     
    531530    return TRUE;
    532531  }
    533   ring qr;
    534   int i,j;
    535   int *pi;
    536 
    537   assumeStdFlag(a);
    538   #ifdef HAVE_PLURAL
    539   if(rIsPluralRing(currRing))
    540   {
    541     if (!hasFlag(a,FLAG_TWOSTD))
    542     {
    543       Warn("%s is no twosided standard basis",a->Name());
    544     }
    545   }
    546   #endif
    547   qr=(ring)res->Data();
     532
     533  ring qr=(ring)res->Data(); // the declaration allocated space
    548534  ring qrr=rCopy(currRing);
    549   memcpy4(qr,qrr,sizeof(ip_sring));
    550   omFreeBin((ADDRESS)qrr, ip_sring_bin);
    551   if (qr->qideal!=NULL) idDelete(&qr->qideal);
    552   qr->qideal = (ideal)a->CopyD(IDEAL_CMD);
    553   //currRing=qr;
    554   //currRingHdl=(idhdl)res->data;
    555   //currQuotient=qr->qideal;
    556   rSetHdl((idhdl)res->data);
    557   return FALSE;
    558 }
    559 #endif
    560 static BOOLEAN jiA_QRING(leftv res, leftv a,Subexpr e)
    561 {
    562   // the follwing can only happen, if:
    563   //   - the left side is of type qring AND not an id
    564   if ((e!=NULL)||(res->rtyp!=IDHDL))
    565   {
    566     WerrorS("qring_id expected");
    567     return TRUE;
    568   }
    569 
    570   ring qr=(ring)res->Data(); // the declaration allocated space
    571   ring qrr=rCopy(currRing);
    572535                 // we have to fill it, but the copy also allocates space
    573536  memcpy4(qr,qrr,sizeof(ip_sring));
     
    576539  ideal id=(ideal)a->CopyD(IDEAL_CMD);
    577540  if (idElem(id)>1) assumeStdFlag(a);
    578   qr->qideal = id;
    579541  if (currRing->qideal!=NULL) /* we are already in a qring! */
    580542  {
    581     ideal tmp=idAdd(id,currRing->qideal);
     543    ideal tmp=idSimpleAdd(id,currRing->qideal);
     544    // both ideals should be GB, so dSimpleAdd is sufficient
    582545    idDelete(&id);
    583546    id=tmp;
    584547  }
     548  qr->qideal = id;
    585549
    586550  // qr is a copy of currRing with the new qideal!
     
    593557    }
    594558
    595     nc_SetupQuotient(qr, currRing); 
     559    nc_SetupQuotient(qr, currRing);
    596560  }
    597561  #endif
     
    806770      if ((l->rtyp==IDHDL) && (l->e==NULL))
    807771        Werror("`%s`(%s) = `%s` is not supported",
    808           Tok2Cmdname(lt),l->Name(),Tok2Cmdname(rt));
     772          Tok2Cmdname(lt),l->Name(),Tok2Cmdname(rt));
    809773      else
    810774         Werror("`%s` = `%s` is not supported"
     
    1014978      }
    1015979  }
    1016   oldL=(lists)l->Data(); 
     980  oldL=(lists)l->Data();
    1017981  if (oldL!=NULL) oldL->Clean();
    1018982  if (l->rtyp==IDHDL)
Note: See TracChangeset for help on using the changeset viewer.