Changeset ec5ec8 in git


Ignore:
Timestamp:
Sep 14, 2011, 8:16:37 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '98550b669234b32be762076c32b3be2c35188ac4')
Children:
0edcce0373257644bc23c5efa79fa53fc1b7cb96
Parents:
407497f6a46f6a77950bc9af3836af45064e4808
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-14 20:16:37+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:49+01:00
Message:
CHG: better tests for input data
ADD: ref++ for the ground ring
Location:
libpolys/polys/ext_fields
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/algext.cc

    r407497 rec5ec8  
    651651BOOLEAN naInitChar(coeffs cf, void * infoStruct)
    652652
    653   assume( cf != NULL );
    654653  assume( infoStruct != NULL );
    655654
    656655  AlgExtInfo *e = (AlgExtInfo *)infoStruct;
    657656  /// first check whether cf->extRing != NULL and delete old ring???
     657
     658  assume(e->r                     != NULL);      // extRing;
     659  assume(e->r->cf                 != NULL);      // extRing->cf;
     660  assume((e->i          != NULL) &&    // minideal has one
     661         (IDELEMS(e->i) != 0)    &&    // non-zero generator
     662         (e->i->m[0]    != NULL)    ); // at m[0];
     663
     664  assume( e->r->minideal == NULL );
     665
     666  assume( cf != NULL );
     667  assume(getCoeffType(cf) == ID);                     // coeff type;
     668 
    658669  cf->extRing           = e->r;
    659   cf->extRing->minideal = e->i;
    660 
    661   assume(cf->extRing                     != NULL);      // extRing;
    662   assume((cf->extRing->minideal          != NULL) &&    // minideal has one
    663          (IDELEMS(cf->extRing->minideal) != 0)    &&    // non-zero generator
    664          (cf->extRing->minideal->m[0]    != NULL)    ); // at m[0];
    665   assume(cf->extRing->cf                 != NULL);      // extRing->cf;
    666   assume(getCoeffType(cf) == ID);                     // coeff type;
    667  
     670  cf->extRing->ref ++; // increase the ref.counter for the ground poly. ring!
     671
     672  cf->extRing->minideal = e->i; // make a copy?
     673
    668674  /* propagate characteristic up so that it becomes
    669675     directly accessible in cf: */
  • libpolys/polys/ext_fields/transext.cc

    r407497 rec5ec8  
    10991099{
    11001100
     1101  assume( infoStruct != NULL );
     1102 
     1103  TransExtInfo *e = (TransExtInfo *)infoStruct;
     1104 
     1105  assume( e->r                != NULL);      // extRing;
     1106  assume( e->r->cf            != NULL);      // extRing->cf;
     1107  assume( e->r->minideal == NULL );
     1108
    11011109  assume( cf != NULL );
    1102   assume( infoStruct != NULL );
    1103  
    1104   TransExtInfo *e = (TransExtInfo *)infoStruct;
    1105   /// first check whether cf->extRing != NULL and delete old ring???
     1110  assume(getCoeffType(cf) == ID);                // coeff type;
     1111
    11061112  cf->extRing           = e->r;
    1107   cf->extRing->minideal = NULL;
    1108 
    1109   assume(cf->extRing                != NULL);      // extRing;
    1110   assume(cf->extRing->cf            != NULL);      // extRing->cf;
    1111   assume(getCoeffType(cf) == ID);                // coeff type;
    1112  
     1113  cf->extRing->ref ++; // increase the ref.counter for the ground poly. ring! 
     1114
    11131115  /* propagate characteristic up so that it becomes
    11141116     directly accessible in cf: */
Note: See TracChangeset for help on using the changeset viewer.