Changeset 7e9f12 in git


Ignore:
Timestamp:
Mar 22, 2012, 6:54:18 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
16c4008b20b489f27f77ca9a45f6dc033a689571
Parents:
bcfd11a55d73c58524f3c5043376c6d7147cb690
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-22 18:54:18+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-23 16:06:34+01:00
Message:
removed minimal ideal from AlgExtInfo infavour of qring

chg: algext. expects a qring (qideal != NULL) and uses it directly
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    rbcfd11a r7e9f12  
    247247
    248248  n_Normalize(p, currRing->cf);
     249   
     250  assume( currRing->cf->extRing->qideal == NULL );
    249251
    250252  AlgExtInfo A;
    251253
    252   A.r = currRing->cf->extRing; // Use the same ground field!
    253   A.i = idInit(1,1);
     254  A.r = rCopy(currRing->cf->extRing); // Copy ground field!
     255  ideal q = idInit(1,1);
    254256
    255257  assume( DEN((fractionObject *)(p)) == NULL ); // minpoly must be a poly...!?
    256258
    257   A.i->m[0] = NUM((fractionObject *)p);
     259  q->m[0] = NUM((fractionObject *)p);
     260  A.r->qideal = q;
    258261
    259262#if 0
     
    273276    Werror("Could not construct the alg. extension: llegal minpoly?");
    274277    // cleanup A: TODO
     278    rDelete( A.r );
    275279    return TRUE;
    276280  }
  • Singular/ipshell.cc

    rbcfd11a r7e9f12  
    21772177          AlgExtInfo extParam;
    21782178
    2179           extParam.i = extRing->qideal;
    21802179          extParam.r = extRing;
    2181 
    2182           extRing->qideal = NULL; // ???
    21832180
    21842181          R->cf = nInitChar(n_algExt, (void*)&extParam);
     
    21882185          TransExtInfo extParam;
    21892186          extParam.r = extRing;
     2187          assume( extRing->qideal == NULL );
    21902188
    21912189          R->cf = nInitChar(n_transExt, &extParam);
     
    51875185    AlgExtInfo extParam;
    51885186    extParam.r = (ring)pn->Data();
    5189     extParam.i = (extParam.r->qideal);
    51905187
    51915188    cf = nInitChar(n_algExt, &extParam);   // Q[a]/<minideal>
  • libpolys/polys/ext_fields/algext.cc

    rbcfd11a r7e9f12  
    553553
    554554  // NOTE: Q(a)[x] && Q(a)[y] should better share the _same_ Q(a)...
    555   if( rEqual(naRing, e->r, TRUE) )
     555  if( rEqual(naRing, e->r, TRUE) ) // also checks the equality of qideals
    556556  {
    557557    const ideal mi = naRing->qideal;
    558558    assume( IDELEMS(mi) == 1 );
    559     ideal ii = e->i;
     559    const ideal ii = e->r->qideal;
    560560    assume( IDELEMS(ii) == 1 );
    561561
    562562    // TODO: the following should be extended for 2 *equal* rings...
    563     if( p_EqualPolys(mi->m[0], ii->m[0], naRing, e->r) )
    564     {
    565       id_Delete(&ii, e->r);
    566       rDelete(e->r);
    567       return TRUE;
    568     }
     563    assume( p_EqualPolys(mi->m[0], ii->m[0], naRing, e->r) );
     564   
     565    rDelete(e->r);
     566   
     567    return TRUE;
    569568  }
    570569
     
    831830  assume(e->r                     != NULL);      // extRing;
    832831  assume(e->r->cf                 != NULL);      // extRing->cf;
    833   assume((e->i          != NULL) &&    // minideal has one
    834          (IDELEMS(e->i) != 0)    &&    // non-zero generator
    835          (e->i->m[0]    != NULL)    ); // at m[0];
    836 
    837   assume( e->r->qideal == NULL );
     832
     833  assume((e->r->qideal            != NULL) &&    // minideal has one
     834         (IDELEMS(e->r->qideal)   == 1)    &&    // non-zero generator
     835         (e->r->qideal->m[0]      != NULL)    ); // at m[0];
    838836
    839837  assume( cf != NULL );
    840838  assume(getCoeffType(cf) == ID);                     // coeff type;
    841839
    842   ring R = e->r;
    843 
    844   R->ref ++; // increase the ref.counter for the ground poly. ring!
    845 
    846   R->qideal = e->i; // make a copy?
    847 
    848   cf->extRing           = R;
     840  e->r->ref ++; // increase the ref.counter for the ground poly. ring!
     841  const ring R = e->r; // no copy!
     842  assume( R->qideal == e->r->qideal );
     843  cf->extRing  = R;
    849844
    850845  /* propagate characteristic up so that it becomes
  • libpolys/polys/ext_fields/algext.h

    rbcfd11a r7e9f12  
    3838
    3939/// struct for passing initialization parameters to naInitChar
    40 typedef struct { ring r; ideal i; } AlgExtInfo;
     40typedef struct { ring r; /*ideal i;*/ } AlgExtInfo; // `r.qideal` is supposed to be `i`
    4141
    4242/// Get a mapping function from src into the domain of this type (n_algExt)
  • libpolys/tests/polys_test.h

    rbcfd11a r7e9f12  
    20022002    TS_ASSERT(type == n_algExt);
    20032003
     2004    r->qideal = minIdeal;
    20042005    AlgExtInfo extParam;
    20052006    extParam.r = r;
    2006     extParam.i = minIdeal;
    20072007
    20082008    clog << "Next create the extension field Q[a]/<a2+1>..." << endl;
     
    21032103    TS_ASSERT(type == n_algExt);
    21042104
     2105    r->qideal = minIdeal;
    21052106    AlgExtInfo extParam;
    21062107    extParam.r = r;
    2107     extParam.i = minIdeal;
    21082108
    21092109    clog << "Next create the extension field Q[b]/<b^7+17>..." << endl;
     
    22472247    TS_ASSERT(type == n_algExt);
    22482248
     2249    r->qideal = minIdeal;
    22492250    AlgExtInfo extParam;
    22502251    extParam.r = r;
    2251     extParam.i = minIdeal;
    22522252
    22532253    clog << "Next create the extension field Z_17[a]/<a^2+3>..." << endl;
Note: See TracChangeset for help on using the changeset viewer.