Changeset fee24e in git for Singular/iparith.cc


Ignore:
Timestamp:
Dec 6, 2011, 12:02:30 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
600d9a415e87303ccbc4a8f4460e9617a66c7f81
Parents:
ae3ad6cdf6204f707110d832cded7d76f5258ed2
git-author:
Martin Lee <martinlee84@web.de>2011-12-06 12:02:30+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-12-12 21:04:27+01:00
Message:
chg: sqrfree command now returns also multiplicities by default
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rae3ad6 rfee24e  
    31453145  return FALSE;
    31463146}
     3147#ifdef HAVE_FACTORY
     3148extern int singclap_factorize_retry;
     3149static BOOLEAN jjSQR_FREE2(leftv res, leftv u, leftv dummy)
     3150{
     3151  intvec *v=NULL;
     3152  int sw=(int)(long)dummy->Data();
     3153  int fac_sw=sw;
     3154  if ((sw<0)||(sw>2)) fac_sw=1;
     3155  singclap_factorize_retry=0;
     3156  ideal f=singclap_sqrfree((poly)(u->CopyD()), &v, fac_sw);
     3157  if (f==NULL)
     3158    return TRUE;
     3159  switch(sw)
     3160  {
     3161    case 0:
     3162    case 2:
     3163    {
     3164      lists l=(lists)omAllocBin(slists_bin);
     3165      l->Init(2);
     3166      l->m[0].rtyp=IDEAL_CMD;
     3167      l->m[0].data=(void *)f;
     3168      l->m[1].rtyp=INTVEC_CMD;
     3169      l->m[1].data=(void *)v;
     3170      res->data=(void *)l;
     3171      res->rtyp=LIST_CMD;
     3172      return FALSE;
     3173    }
     3174    case 1:
     3175      res->data=(void *)f;
     3176      return FALSE;
     3177    case 3:
     3178      {
     3179        poly p=f->m[0];
     3180        int i=IDELEMS(f);
     3181        f->m[0]=NULL;
     3182        while(i>1)
     3183        {
     3184          i--;
     3185          p=pMult(p,f->m[i]);
     3186          f->m[i]=NULL;
     3187        }
     3188        res->data=(void *)p;
     3189        res->rtyp=POLY_CMD;
     3190      }
     3191      return FALSE;
     3192  }
     3193  WerrorS("invalid switch");
     3194  return FALSE;
     3195}
     3196#endif
    31473197static BOOLEAN jjSTATUS2(leftv res, leftv u, leftv v)
    31483198{
     
    46294679}
    46304680#ifdef HAVE_FACTORY
    4631 extern int singclap_factorize_retry;
    46324681static BOOLEAN jjSQR_FREE(leftv res, leftv u)
    46334682{
    46344683  singclap_factorize_retry=0;
    4635   ideal f=singclap_sqrfree((poly)(u->CopyD()),currRing);
    4636   if (f==NULL)
    4637     return TRUE;
    4638   res->data=(void *)f;
     4684  ideal f=singclap_sqrfree((poly)(u->CopyD()), &v, 0, currRing);
     4685  if (f==NULL) return TRUE;
     4686  ivTest(v);
     4687  lists l=(lists)omAllocBin(slists_bin);
     4688  l->Init(2);
     4689  l->m[0].rtyp=IDEAL_CMD;
     4690  l->m[0].data=(void *)f;
     4691  l->m[1].rtyp=INTVEC_CMD;
     4692  l->m[1].data=(void *)v;
     4693  res->data=(void *)l;
    46394694  return FALSE;
    46404695}
Note: See TracChangeset for help on using the changeset viewer.