Changeset cfbcdce in git


Ignore:
Timestamp:
May 8, 2006, 3:28:10 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
4f0a5a7540e7e15b498f2c22ed22d461c02444f6
Parents:
fa98a4f5c478760aa9bbf122228fe2c21c16173c
Message:
*hannes: do not believe in isHomog: test


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rfa98a4 rcfbcdce  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.390 2006-03-06 14:11:19 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.391 2006-05-08 13:28:10 Singular Exp $ */
    55
    66/*
     
    26162616  intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
    26172617  tHomog hom=testHomog;
     2618  ideal u_id=(ideal)(u->Data());
    26182619  if (w!=NULL)
    26192620  {
    2620     w=ivCopy(w);
    2621     hom=isHomog;
    2622   }
    2623   result=kStd((ideal)(u->Data()),currQuotient,hom,&w,(intvec *)v->Data());
     2621     if (!idHomModule(u_id,currQuotient,&w))
     2622     {
     2623       WarnS("wrong weights");
     2624       w=NULL;
     2625     }
     2626     else
     2627     {
     2628       w=ivCopy(w);
     2629       hom=isHomog;
     2630     }
     2631  }
     2632  result=kStd(u_id,currQuotient,hom,&w,(intvec *)v->Data());
    26242633  idSkipZeroes(result);
    26252634  res->data = (char *)result;
     
    26322641  assumeStdFlag(u);
    26332642  ideal result;
     2643  ideal u_id=(ideal)(u->Data());
    26342644  intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
    26352645  tHomog hom=testHomog;
    26362646  if (w!=NULL)
    26372647  {
    2638     w=ivCopy(w);
    2639     hom=isHomog;
    2640   }
    2641   ideal i1=(ideal)u->Data();
    2642   ideal i0=idInit(1,i1->rank);
     2648     if (!idHomModule(u_id,currQuotient,&w))
     2649     {
     2650       WarnS("wrong weights");
     2651       w=NULL;
     2652     }
     2653     else
     2654     {
     2655       w=ivCopy(w);
     2656       hom=isHomog;
     2657     }
     2658  }
     2659  ideal i0=idInit(1,u_id->rank);
    26432660  i0->m[0]=(poly)v->Data();
    2644   i1=idSimpleAdd(i1,i0);
     2661  u_id=idSimpleAdd(u_id,i0);
    26452662  i0->m[0]=NULL;
    26462663  idDelete(&i0);
    26472664  BITSET save_test=test;
    26482665  test|=Sy_bit(OPT_SB_1);
    2649   result=kStd(i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)-1);
     2666  result=kStd(u_id,currQuotient,hom,&w,NULL,0,IDELEMS(u_id)-1);
    26502667  test=save_test;
    2651   idDelete(&i1);
     2668  idDelete(&u_id);
    26522669  idSkipZeroes(result);
    26532670  res->data = (char *)result;
     
    36403657  intvec *weights=(intvec*)atGet(v,"isHomog",INTVEC_CMD);
    36413658  res->data=(char *)syMinimize((syStrategy)v->Data());
    3642   if (weights!=NULL) 
     3659  if (weights!=NULL)
    36433660    atSet(res, omStrDup("isHomog"),ivCopy(weights),INTVEC_CMD);
    36443661  return FALSE;
     
    37423759  if (w!=NULL)
    37433760  {
    3744     w=ivCopy(w);
    3745     intvec **ww=&w;
    3746     res->data = (char *)idMinEmbedding(v_id,FALSE,ww);
    3747     atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD);
    3748   }
    3749   else
    3750     res->data = (char *)idMinEmbedding(v_id);
     3761     if (!idHomModule(v_id,currQuotient,&w))
     3762     {
     3763       WarnS("wrong weights");
     3764       w=NULL;
     3765     }
     3766     else
     3767     {
     3768       w=ivCopy(w);
     3769       intvec **ww=&w;
     3770       res->data = (char *)idMinEmbedding(v_id,FALSE,ww);
     3771       atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD);
     3772       return FALSE;
     3773     }
     3774  }
     3775  //else // both else branches
     3776  res->data = (char *)idMinEmbedding(v_id);
    37513777  return FALSE;
    37523778}
     
    38353861  intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
    38363862  tHomog hom=testHomog;
     3863  ideal u_id=(ideal)u->Data();
    38373864  if (w!=NULL)
    38383865  {
    3839     w=ivCopy(w);
    3840     hom=isHomog;
    3841   }
    3842   res->data=(char *)t_rep_gb(currRing, (ideal)u->Data());
     3866    if (!idHomModule(u_id,currQuotient,&w))
     3867    {
     3868      WarnS("wrong weights");
     3869      w=NULL;
     3870    }
     3871    else
     3872    {
     3873      w=ivCopy(w);
     3874      hom=isHomog;
     3875    }
     3876  }
     3877  res->data=(char *)t_rep_gb(currRing, u_id);
    38433878  setFlag(res,FLAG_STD);
    38443879  if (w!=NULL) atSet(res,omStrDup("isHomog"),w,INTVEC_CMD);
     
    38483883{
    38493884  ideal result;
     3885  ideal v_id=(ideal)v->Data();
    38503886  intvec *w=(intvec *)atGet(v,"isHomog",INTVEC_CMD);
    38513887  tHomog hom=testHomog;
    38523888  if (w!=NULL)
    38533889  {
    3854     w=ivCopy(w);
    3855     hom=isHomog;
    3856   }
    3857   result=kStd((ideal)(v->Data()),currQuotient,hom,&w);
     3890    if (!idHomModule(v_id,currQuotient,&w))
     3891    {
     3892      WarnS("wrong weights");
     3893      w=NULL;
     3894    }
     3895    else
     3896    {
     3897      w=ivCopy(w);
     3898      hom=isHomog;
     3899    }
     3900  }
     3901  result=kStd(v_id,currQuotient,hom,&w);
    38583902  idSkipZeroes(result);
    38593903  res->data = (char *)result;
     
    52785322{
    52795323  int maxl=(int)v->Data();
     5324  ideal u_id=(ideal)u->Data();
    52805325  int l=0;
    52815326  resolvente r;
     
    52905335    if (iv!=NULL)
    52915336    {
    5292       weights = (intvec**)omAlloc0Bin(void_ptr_bin);
    5293       weights[0] = ivCopy(iv);
    5294       l=1;
    5295     }
    5296     r=syResolvente((ideal)u->Data(),maxl,&l, &weights, iiOp==MRES_CMD);
     5337      if (!idHomModule(u_id,currQuotient,&iv))
     5338      {
     5339        WarnS("wrong weights");
     5340        iv=NULL;
     5341      }
     5342      else
     5343      {
     5344        weights = (intvec**)omAlloc0Bin(void_ptr_bin);
     5345        weights[0] = ivCopy(iv);
     5346        l=1;
     5347      }
     5348    }
     5349    r=syResolvente(u_id,maxl,&l, &weights, iiOp==MRES_CMD);
    52975350  }
    52985351  else
     
    53025355  iiMakeResolv(r,l,wmaxl,w->name,t3,weights);
    53035356  return FALSE;
    5304   return TRUE;
    53055357}
    53065358#endif
     
    53245376  intvec *ww=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
    53255377  tHomog hom=testHomog;
     5378  ideal u_id=(ideal)(u->Data());
    53265379  if (ww!=NULL)
    53275380  {
    5328     ww=ivCopy(ww);
    5329     hom=isHomog;
    5330   }
    5331   result=kStd((ideal)(u->Data()),
     5381    if (!idHomModule(u_id,currQuotient,&ww))
     5382    {
     5383      WarnS("wrong weights");
     5384      ww=NULL;
     5385    }
     5386    else
     5387    {
     5388      ww=ivCopy(ww);
     5389      hom=isHomog;
     5390    }
     5391  }
     5392  result=kStd(u_id,
    53325393              currQuotient,
    53335394              hom,
Note: See TracChangeset for help on using the changeset viewer.