Changeset dd668f in git


Ignore:
Timestamp:
Mar 21, 2012, 6:48:05 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
bcfd11a55d73c58524f3c5043376c6d7147cb690
Parents:
f630e4e0ae481c82576fce09c99655b85d5e04e8
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-21 18:48:05+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-23 16:06:34+01:00
Message:
use minideal (instead of qideal) in rCompose

chg: use qideal instead of minideal for alg_ext

TODO: remove direct access to extRing from outside
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    rf630e4 rdd668f  
    35393539          mipo_id->m[i]=p;
    35403540        }
    3541         new_ring->minideal=id_Copy(alg_ring->qideal,new_ring);
     3541        new_ring->qideal=id_Copy(alg_ring->qideal,new_ring);
    35423542        // convert factors =============================================
    35433543        ideal fac_id=idInit(L.length(),1);
  • Singular/iparith.cc

    rf630e4 rdd668f  
    36203620#ifdef HAVE_FACTORY
    36213621    extern int ipower ( int b, int n ); /* factory/cf_util */
    3622     elems=ipower(r->cf->ch,r->cf->extRing->pFDeg(r->cf->extRing->minideal->m[0],r->cf->extRing));
     3622    elems=ipower(r->cf->ch,r->cf->extRing->pFDeg(r->cf->extRing->qideal->m[0],r->cf->extRing));
    36233623#else
    3624     elems=(int)pow((double) r->cf->ch,(double)r->cf->extRing->pFDeg(r->cf->extRing->minideal->m[0],r->cf->extRing));
     3624    elems=(int)pow((double) r->cf->ch,(double)r->cf->extRing->pFDeg(r->cf->extRing->qideal->m[0],r->cf->extRing));
    36253625#endif
    36263626  }
  • Singular/ipshell.cc

    rf630e4 rdd668f  
    16581658  else
    16591659  {
    1660     ideal q=idInit(IDELEMS(r->minideal));
     1660    ideal q=idInit(IDELEMS(r->qideal));
    16611661    q->m[0]=p_Init(R);
    1662     pSetCoeff0(q->m[0],(number)(r->minideal->m[0]));
     1662    pSetCoeff0(q->m[0],(number)(r->qideal->m[0]));
    16631663    L->m[3].data=(void *)q;
    16641664//    I->m[0] = pNSet(R->minpoly);
     
    24732473            BITSET save_test=test;
    24742474
    2475 //            if ((orig_ring->minpoly != NULL) || (orig_ring->minideal != NULL))
     2475//            if ((orig_ring->minpoly != NULL) || (orig_ring->qideal != NULL))
    24762476//              naSetChar(rInternalChar(orig_ring),orig_ring);
    24772477//            else ntSetChar(rInternalChar(orig_ring),orig_ring);
  • Singular/silink.cc

    rf630e4 rdd668f  
    779779    {
    780780      StringSetS("");
    781       p_Write(IDRING(h)->cf->extRing->minideal->m[0],IDRING(h)->cf->extRing);
     781      p_Write(IDRING(h)->cf->extRing->qideal->m[0],IDRING(h)->cf->extRing);
    782782      rhs = StringAppendS("");
    783783      if (fprintf(fd, "; minpoly = %s", rhs) == EOF) return EOF;
  • Singular/subexpr.cc

    rf630e4 rdd668f  
    634634
    635635      assume( A != NULL );
    636       assume( A->minideal != NULL );
    637 
    638       x=(void *)p_Copy(A->minideal->m[0], A);
     636      assume( A->qideal != NULL );
     637
     638      x=(void *)p_Copy(A->qideal->m[0], A);
    639639    }
    640640    data=NULL;
     
    10541054
    10551055          assume( A != NULL );
    1056           assume( A->minideal != NULL );
    1057 
    1058           return (void *)A->minideal->m[0];
     1056          assume( A->qideal != NULL );
     1057
     1058          return (void *)A->qideal->m[0];
    10591059        }
    10601060        else
  • Singular/walk.cc

    rf630e4 rdd668f  
    19511951//   if (rParameter (currRing)!=NULL)
    19521952//   {
    1953 //     res->cf->extRing->minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0],currRing->cf->extRing);
     1953//     res->cf->extRing->qideal->m[0]=p_Copy(currRing->cf->extRing->qideal->m[0],currRing->cf->extRing);
    19541954//     int l=rPar(currRing);
    19551955//     
     
    20342034//   if (rParameter (currRing)!=NULL)
    20352035//   {
    2036 //     r->cf->extRing->minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0], currRing->cf->extRing);
     2036//     r->cf->extRing->qideal->m[0]=p_Copy(currRing->cf->extRing->qideal->m[0], currRing->cf->extRing);
    20372037//     int l=rPar(currRing);
    20382038//     r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr));
     
    20822082//   if (rParameter(currRing)!=NULL)
    20832083//   {
    2084 //     r->cf->extRing->minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0], currRing->cf->extRing);
     2084//     r->cf->extRing->qideal->m[0]=p_Copy(currRing->cf->extRing->qideal->m[0], currRing->cf->extRing);
    20852085//     int l=rPar(currRing);
    20862086//     r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr));
  • libpolys/coeffs/coeffWrite

    rf630e4 rdd668f  
    6464        PrintS("...\n");
    6565      }
    66       if (r->minideal!=NULL)
     66      if (r->qideal!=NULL)
    6767      {
    68         if (r==currRing) iiWriteMatrix((matrix)r->minideal,"//   minpolys",1,r,0);
     68        if (r==currRing) iiWriteMatrix((matrix)r->qideal,"//   minpolys",1,r,0);
    6969        else PrintS("//   minpolys=...");
    7070        PrintLn();
  • libpolys/coeffs/coeffs.h

    rf630e4 rdd668f  
    237237
    238238  //number     minpoly;  //< no longer needed: replaced by
    239   //                     //< extRing->minideal->[0]
     239  //                     //< extRing->qideal->[0]
    240240
    241241
  • libpolys/polys/clapconv.cc

    rf630e4 rdd668f  
    290290  if (a!=NULL)
    291291  {
    292     if (r->cf->extRing->minideal->m[0]!=NULL)
    293     {
    294       poly l=r->cf->extRing->minideal->m[0];
     292    if (r->cf->extRing->qideal->m[0]!=NULL)
     293    {
     294      poly l=r->cf->extRing->qideal->m[0];
    295295      if (p_GetExp(a,1,r->cf->extRing) >= p_GetExp(l,1,r->cf->extRing))
    296296        a = p_PolyDiv (a, l, FALSE, r->cf->extRing);
  • libpolys/polys/clapsing.cc

    rf630e4 rdd668f  
    7575    if ( rField_is_Q_a(r)) setCharacteristic( 0 );
    7676    else                   setCharacteristic( rChar(r) );
    77     if (r->cf->extRing->minideal!=NULL)
     77    if (r->cf->extRing->qideal!=NULL)
    7878    {
    7979      bool b1=isOn(SW_USE_QGCD);
     
    8181      if ( rField_is_Q_a(r) ) On(SW_USE_QGCD);
    8282      else                   On(SW_USE_fieldGCD);
    83       CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     83      CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    8484                                           r->cf->extRing);
    8585      Variable a=rootOf(mipo);
     
    160160    else               setCharacteristic( rChar(r) );
    161161    Variable X(i+rPar(r));
    162     if (r->cf->extRing->minideal!=NULL)
     162    if (r->cf->extRing->qideal!=NULL)
    163163    {
    164164      //Variable X(i);
    165       CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     165      CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    166166                                           r->cf->extRing);
    167167      Variable a=rootOf(mipo);
     
    306306    else                 setCharacteristic( rChar(r) );
    307307    CanonicalForm Fa,Gb;
    308     if (r->cf->extRing->minideal!=NULL)
    309     {
    310       CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     308    if (r->cf->extRing->qideal!=NULL)
     309    {
     310      CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    311311                                           r->cf->extRing);
    312312      Variable a=rootOf(mipo);
     
    374374    if (rField_is_Q_a(r)) setCharacteristic( 0 );
    375375    else               setCharacteristic( rChar(r) );
    376     if (r->cf->extRing->minideal!=NULL)
    377     {
    378       CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     376    if (r->cf->extRing->qideal!=NULL)
     377    {
     378      CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    379379                                                 r->cf->extRing);
    380380      Variable a=rootOf(mipo);
     
    530530    else if (rField_is_Extension(r))
    531531    {
    532       if (r->cf->extRing->minideal!=NULL)
    533       {
    534         CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     532      if (r->cf->extRing->qideal!=NULL)
     533      {
     534        CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    535535                                    r->cf->extRing);
    536536        a=rootOf(mipo);
     
    563563        else if (rField_is_Extension(r))
    564564        {
    565           if (r->cf->extRing->minideal!=NULL)
     565          if (r->cf->extRing->qideal!=NULL)
    566566          {
    567567            q= convFactoryAPSingAP( Q,r );
     
    733733    if (rField_is_Q_a (r)) setCharacteristic (0);
    734734    else                   setCharacteristic( rChar(r) );
    735     if (r->cf->extRing->minideal!=NULL)
    736     {
    737       CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     735    if (r->cf->extRing->qideal!=NULL)
     736    {
     737      CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    738738                                           r->cf->extRing);
    739739      Variable a=rootOf(mipo);
     
    795795        intvec *w=NULL;
    796796        if (v!=NULL) w=*v;
    797         if (r->cf->extRing->minideal==NULL)
     797        if (r->cf->extRing->qideal==NULL)
    798798        {
    799799          if(!count_Factors(res,w,j,ff,convFactoryPSingTrP( J.getItem().factor(),r ),r))
     
    927927    }
    928928  }
    929   if (rField_is_Q_a(r) && (r->cf->extRing->minideal!=NULL))
     929  if (rField_is_Q_a(r) && (r->cf->extRing->qideal!=NULL))
    930930  {
    931931    int i=IDELEMS(res)-1;
     
    10911091    if (rField_is_Q_a (r)) setCharacteristic (0);
    10921092    else                   setCharacteristic( rChar(r) );
    1093     if (r->cf->extRing->minideal!=NULL)
    1094     {
    1095       CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->minideal->m[0],
     1093    if (r->cf->extRing->qideal!=NULL)
     1094    {
     1095      CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0],
    10961096                                           r->cf->extRing);
    10971097      Variable a=rootOf(mipo);
     
    11531153      else if (rField_is_Extension(r))     /* Q(a), Fp(a) */
    11541154      {
    1155         if (r->cf->extRing->minideal==NULL)
     1155        if (r->cf->extRing->qideal==NULL)
    11561156          res->m[j]=convFactoryPSingTrP( J.getItem().factor(),r );
    11571157        else
     
    11701170    }
    11711171  }
    1172   if (rField_is_Q_a(r) && (r->cf->extRing->minideal!=NULL))
     1172  if (rField_is_Q_a(r) && (r->cf->extRing->qideal!=NULL))
    11731173  {
    11741174    int i=IDELEMS(res)-1;
  • libpolys/polys/ext_fields/algext.cc

    rf630e4 rdd668f  
    1414  *               towers).
    1515  *           2.) Moreover, this implementation assumes that
    16   *               cf->extRing->minideal is not NULL but an ideal with at
     16  *               cf->extRing->qideal is not NULL but an ideal with at
    1717  *               least one non-zero generator which may be accessed by
    18   *               cf->extRing->minideal->m[0] and which represents the minimal
     18  *               cf->extRing->qideal->m[0] and which represents the minimal
    1919  *               polynomial f(a) of the extension variable 'a' in K[a].
    2020  *           3.) As soon as an std method for polynomial rings becomes
     
    7373
    7474/* minimal polynomial */
    75 #define naMinpoly naRing->minideal->m[0]
     75#define naMinpoly naRing->qideal->m[0]
    7676
    7777/// forward declarations
     
    321321  PrintLn();
    322322
    323   const ideal I = A->minideal;
     323  const ideal I = A->qideal;
    324324
    325325  assume( I != NULL );
     
    343343  Print("//   Coefficients live in the extension field K[%s]/<f(%s)>\n", x, x);
    344344  Print("//   with the minimal polynomial f(%s) = %s\n", x,
    345         p_String(A->minideal->m[0], A));
     345        p_String(A->qideal->m[0], A));
    346346  PrintS("//   and K: ");
    347347*/
     
    555555  if( rEqual(naRing, e->r, TRUE) )
    556556  {
    557     const ideal mi = naRing->minideal;
     557    const ideal mi = naRing->qideal;
    558558    assume( IDELEMS(mi) == 1 );
    559559    ideal ii = e->i;
     
    835835         (e->i->m[0]    != NULL)    ); // at m[0];
    836836
    837   assume( e->r->minideal == NULL );
     837  assume( e->r->qideal == NULL );
    838838
    839839  assume( cf != NULL );
     
    844844  R->ref ++; // increase the ref.counter for the ground poly. ring!
    845845
    846   R->minideal = e->i; // make a copy?
     846  R->qideal = e->i; // make a copy?
    847847
    848848  cf->extRing           = R;
  • libpolys/polys/ext_fields/algext.h

    rf630e4 rdd668f  
    1616*               towers).
    1717*           2.) Moreover, this implementation assumes that
    18 *               cf->extRing->minideal is not NULL but an ideal with at
     18*               cf->extRing->qideal is not NULL but an ideal with at
    1919*               least one non-zero generator which may be accessed by
    20 *               cf->extRing->minideal->m[0] and which represents the minimal
     20*               cf->extRing->qideal->m[0] and which represents the minimal
    2121*               polynomial f(a) of the extension variable 'a' in K[a].
    2222*           3.) As soon as an std method for polynomial rings becomes
  • libpolys/polys/ext_fields/transext.cc

    rf630e4 rdd668f  
    477477    Print("%s ", rRingVar(nop, A));
    478478
    479   assume( A->minideal == NULL );
     479  assume( A->qideal == NULL );
    480480
    481481  PrintS("\n//   minpoly        : 0\n");
     
    14131413  assume( e->r                != NULL);      // extRing;
    14141414  assume( e->r->cf            != NULL);      // extRing->cf;
    1415   assume( e->r->minideal == NULL );
     1415  assume( e->r->qideal == NULL );
    14161416
    14171417  assume( cf != NULL );
  • libpolys/polys/monomials/ring.cc

    rf630e4 rdd668f  
    305305        StringSetS(""); n_Write(r->cf->minpoly, r); PrintS(StringAppendS("\n"));
    306306      }
    307       //if (r->minideal!=NULL)
     307      //if (r->qideal!=NULL)
    308308      //{
    309       //  iiWriteMatrix((matrix)r->minideal,"//   minpolys",1,r,0);
     309      //  iiWriteMatrix((matrix)r->qideal,"//   minpolys",1,r,0);
    310310      //  PrintLn();
    311311      //}
     
    828828      else if (nCoeff_is_Extension(r2->cf) && rChar(r2) == rChar(r1))
    829829      {
     830        /*AlgExtInfo extParam;
     831        extParam.r = r2->cf->extRing;
     832        extParam.i = r2->cf->extRing->qideal;*/
    830833        tmpR.cf=r2->cf;
    831834        r2->cf->ref++;
     
    14461449
    14471450  res->extRing=r->extRing;
    1448   //memset: res->minideal=NULL;
     1451  //memset: res->qideal=NULL;
    14491452*/
    14501453
     
    15901593
    15911594  res->extRing=r->extRing;
    1592   //memset: res->minideal=NULL;
     1595  //memset: res->qideal=NULL;
    15931596*/
    15941597
     
    21292132
    21302133  if (!rMinpolyIsNULL(r))
    2131     omCheckAddr(r->cf->extRing->minideal->m[0]);
     2134    omCheckAddr(r->cf->extRing->qideal->m[0]);
    21322135
    21332136  //assume(r->cf!=NULL);
     
    56345637  assume(C != NULL);
    56355638
    5636   const BOOLEAN ret = nCoeff_is_algExt(C);
     5639  const BOOLEAN ret = nCoeff_is_algExt(C); //  || nCoeff_is_GF(C) || nCoeff_is_long_C(C);
    56375640
    56385641  if( ret )
     
    56405643    const ring R = C->extRing;
    56415644    assume( R != NULL );
    5642     assume( !idIs0(R->minideal) );
    5643   }
    5644 
     5645    assume( !idIs0(R->qideal) );
     5646  }
     5647 
     5648  // TODO: it should be "!ret" but it'd lead to test fails (due to rDecompose?)
    56455649  return ret;
    56465650}
  • libpolys/polys/monomials/ring.h

    rf630e4 rdd668f  
    210210  int*       block1; /* ending pos., rInit/rSleftvOrdering2Ordering*/
    211211//  char**     parameter; /* names of parameters, rInit */
    212 //  number     minpoly;  /* replaced by minideal->m[0] */
    213   ideal      minideal;   /* for Q_a/Zp_a, rInit;
    214                             for a start, we assume that there is either no
    215                             or exactly one generator in minideal, playing
    216                             the role of the former minpoly; minideal may
    217                             also be NULL which coincides with the
    218                             no-generator-case */
    219212  int**      wvhdl;  /* array of weight vectors, rInit/rSleftvOrdering2Ordering */
    220213  char **    names;  /* array of variable names, rInit */
     
    233226  int*     VarOffset;
    234227
    235   ideal      qideal; /* extension to the ring structure: qring, rInit */
     228//  ideal      minideal;
     229//  number     minpoly;  /* replaced by minideal->m[0] */
     230  ideal      qideal; /**< extension to the ring structure: qring, rInit, OR
     231                          for Q_a/Zp_a, rInit (replaces minideal!);
     232                          for a start, we assume that there is either no
     233                          or exactly one generator in minideal, playing
     234                          the role of the former minpoly; minideal may
     235                          also be NULL which coincides with the
     236                          no-generator-case **/
    236237
    237238  int*     firstwv;
Note: See TracChangeset for help on using the changeset viewer.