Changeset b4ab6fb in git for Singular/iparith.cc


Ignore:
Timestamp:
May 8, 2006, 7:45:31 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
ef8adb7b933493dbcb80792c9d08a0406bb6d8b7
Parents:
54b460b5e3bb8b89e445c43cbe3540f147ea8d84
Message:
*hannes: homo tests


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r54b460 rb4ab6fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.393 2006-05-08 15:00:38 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.394 2006-05-08 17:45:31 Singular Exp $ */
    55
    66/*
     
    20582058     else
    20592059     {
    2060        if ((!idHomModule(u_id,currQuotient,&w_v))
    2061        || (!idHomModule(v_id,currQuotient,&w_v)))
     2060       if ((!idTestHomModule(u_id,currQuotient,w_v))
     2061       || (!idTestHomModule(v_id,currQuotient,w_v)))
    20622062       {
    20632063         WarnS("wrong weights");
     
    26192619  if (w!=NULL)
    26202620  {
    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      }
     2621    if (!idTestHomModule(u_id,currQuotient,w))
     2622    {
     2623      WarnS("wrong weights");
     2624      w=NULL;
     2625    }
     2626    else
     2627    {
     2628      w=ivCopy(w);
     2629      hom=isHomog;
     2630    }
    26312631  }
    26322632  result=kStd(u_id,currQuotient,hom,&w,(intvec *)v->Data());
     
    26392639static BOOLEAN jjSTD_1(leftv res, leftv u, leftv v)
    26402640{
     2641  ideal result;
    26412642  assumeStdFlag(u);
    2642   ideal result;
    2643   ideal u_id=(ideal)(u->Data());
     2643  ideal i1=(ideal)(u->Data());
     2644  ideal i0=idInit(1,i1->rank);
     2645  i0->m[0]=(poly)v->Data();
     2646  i1=idSimpleAdd(i1,i0);
     2647  i0->m[0]=NULL;
     2648  idDelete(&i0);
    26442649  intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
    26452650  tHomog hom=testHomog;
    26462651  if (w!=NULL)
    26472652  {
    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);
    2660   i0->m[0]=(poly)v->Data();
    2661   u_id=idSimpleAdd(u_id,i0);
    2662   i0->m[0]=NULL;
    2663   idDelete(&i0);
     2653    if (!idTestHomModule(i1,currQuotient,w))
     2654    {
     2655      // no warnung: this is legal, if i in std(i,p)
     2656      // is homogeneous, but p not
     2657      w=NULL;
     2658    }
     2659    else
     2660    {
     2661      w=ivCopy(w);
     2662      hom=isHomog;
     2663    }
     2664  }
    26642665  BITSET save_test=test;
    26652666  test|=Sy_bit(OPT_SB_1);
    2666   result=kStd(u_id,currQuotient,hom,&w,NULL,0,IDELEMS(u_id)-1);
     2667  result=kStd(i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)-1);
    26672668  test=save_test;
    2668   idDelete(&u_id);
     2669  idDelete(&i1);
    26692670  idSkipZeroes(result);
    26702671  res->data = (char *)result;
     
    37633764  if (w!=NULL)
    37643765  {
    3765      if (!idHomModule(v_id,currQuotient,&w))
    3766      {
    3767        WarnS("wrong weights");
    3768        w=NULL;
    3769      }
    3770      else
    3771      {
    3772        w=ivCopy(w);
    3773        intvec **ww=&w;
    3774        res->data = (char *)idMinEmbedding(v_id,FALSE,ww);
    3775        atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD);
    3776        return FALSE;
    3777      }
    3778   }
    3779   //else // both else branches
     3766    if (!idTestHomModule(v_id,currQuotient,w))
     3767    {
     3768      WarnS("wrong weights");
     3769      w=NULL;
     3770      // and continue at the non-homog case below
     3771    }
     3772    else
     3773    {
     3774      w=ivCopy(w);
     3775      intvec **ww=&w;
     3776      res->data = (char *)idMinEmbedding(v_id,FALSE,ww);
     3777      atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD);
     3778      return FALSE;
     3779    }
     3780  }
    37803781  res->data = (char *)idMinEmbedding(v_id);
    37813782  return FALSE;
     
    38683869  if (w!=NULL)
    38693870  {
    3870     if (!idHomModule(u_id,currQuotient,&w))
     3871    if (!idTestHomModule(u_id,currQuotient,w))
    38713872    {
    38723873      WarnS("wrong weights");
     
    38923893  if (w!=NULL)
    38933894  {
    3894     if (!idHomModule(v_id,currQuotient,&w))
     3895    if (!idTestHomModule(v_id,currQuotient,w))
    38953896    {
    38963897      WarnS("wrong weights");
     
    38993900    else
    39003901    {
     3902      hom=isHomog;
    39013903      w=ivCopy(w);
    3902       hom=isHomog;
    39033904    }
    39043905  }
     
    39363937    add_row_shift=w->min_in();
    39373938    (*w)-=add_row_shift;
    3938     if (idHomModule(v_id,currQuotient,&w))
     3939    if (idTestHomModule(v_id,currQuotient,w))
    39393940      hom=isHomog;
    39403941    else
     
    53395340    if (iv!=NULL)
    53405341    {
    5341       if (!idHomModule(u_id,currQuotient,&iv))
     5342      if (!idTestHomModule(u_id,currQuotient,iv))
    53425343      {
    53435344        WarnS("wrong weights");
     
    53835384  if (ww!=NULL)
    53845385  {
    5385     if (!idHomModule(u_id,currQuotient,&ww))
     5386    if (!idTestHomModule(u_id,currQuotient,ww))
    53865387    {
    53875388      WarnS("wrong weights");
Note: See TracChangeset for help on using the changeset viewer.