Changeset f50eb2 in git


Ignore:
Timestamp:
Jun 8, 2020, 6:26:41 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8b7ebfed239b67853aad0eec6fc2f727b9ec55d5ab7174f97f3aaf313466647c215f8a4bf78bcdaa
Parents:
fdda5465265805b57a9c0f85de0debd58cd07bee
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2020-06-08 18:26:41+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2020-06-08 18:30:54+02:00
Message:
jjSetMinpoly
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    rfdda546 rf50eb2  
    171171  }
    172172}
    173 ring jjSetMinpoly(ring r, number a, BOOLEAN modify)
    174 {
    175   if( !nCoeff_is_transExt(r->cf) && (r->idroot == NULL) && n_IsZero(a, r->cf) )
    176   {
    177     return r;
    178   }
    179 
    180 
     173ring jjSetMinpoly(ring r, number a)
     174{
    181175  if ( !nCoeff_is_transExt(r->cf) )
    182176  {
     
    187181    }
    188182  }
    189   if ((rVar(r->cf->extRing)!=1)
    190   && !n_IsZero(a, r->cf) )
     183  if (rVar(r->cf->extRing)!=1)
    191184  {
    192185    WerrorS("only univarite minpoly allowed");
     
    194187  }
    195188
    196   BOOLEAN redefine_from_algext=FALSE;
    197   if ( r->idroot != NULL )
    198   {
    199     redefine_from_algext=(r->cf->extRing->qideal!=NULL);
    200   }
    201 
    202 //  assume (r->idroot==NULL);
     189  assume (r->idroot==NULL);
    203190
    204191  number p = n_Copy(a,r->cf);
     
    215202    return NULL;
    216203  }
    217   if (!modify) r=rCopy(r);
     204  r=rCopy(r);
    218205  // remove all object currently in the ring
    219   while(r->idroot!=NULL)
    220   {
    221 #ifndef SING_NDEBUG
    222     Warn("killing a local object due to minpoly change: %s", IDID(r->idroot));
    223 #endif
    224     killhdl2(r->idroot,&(r->idroot),r);
    225   }
    226206
    227207  AlgExtInfo A;
     
    236216    // cleanup A: TODO
    237217    rDelete( A.r );
    238     if (!modify) rDelete(r);
     218    rDelete(r);
    239219    return NULL;
    240220  }
    241   if (!redefine_from_algext && (DEN((fraction)(p)) != NULL)) // minpoly must be a fraction with poly numerator...!!
     221  if (DEN((fraction)(p)) != NULL) // minpoly must be a fraction with poly numerator...!!
    242222  {
    243223    poly n=DEN((fraction)(p));
     
    250230  }
    251231
    252   if (redefine_from_algext) q->m[0]=(poly)p;
    253   else          q->m[0] = NUM((fraction)p);
     232  q->m[0] = NUM((fraction)p);
    254233  A.r->qideal = q;
    255234
    256   if (!redefine_from_algext)
    257   {
    258     EXTERN_VAR omBin fractionObjectBin;
    259     NUM((fractionObject *)p) = NULL; // not necessary, but still...
    260     omFreeBin((ADDRESS)p, fractionObjectBin);
    261   }
     235  EXTERN_VAR omBin fractionObjectBin;
     236  NUM((fractionObject *)p) = NULL; // not necessary, but still...
     237  omFreeBin((ADDRESS)p, fractionObjectBin);
    262238
    263239  coeffs new_cf = nInitChar(n_algExt, &A);
     
    267243    // cleanup A: TODO
    268244    rDelete( A.r );
    269     if (!modify) rDelete(r);
     245    rDelete(r);
    270246    return NULL;
    271247  }
  • Singular/ipshell.h

    rfdda546 rf50eb2  
    171171/* Assigments : */
    172172BOOLEAN iiAssign(leftv left, leftv right, BOOLEAN toplevel=TRUE);
    173 ring jjSetMinpoly(ring r, number a, BOOLEAN modify);
     173ring jjSetMinpoly(ring r, number a);
    174174
    175175typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
Note: See TracChangeset for help on using the changeset viewer.