Changeset e5a4ba in git


Ignore:
Timestamp:
Mar 24, 2011, 6:36:09 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
Children:
636c2808c40cfb805ae982e6a313b80f12ef1ef9
Parents:
cdd96488f933020972d13b626d1e41b8da9a4786
Message:
FIX: wrong assumes

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@14065 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    rcdd964 re5a4ba  
    24392439  if (L->nr==5)
    24402440  {
    2441     if (nc_CallPlural((matrix)L->m[4].Data(),(matrix)L->m[5].Data(),NULL,NULL,R, true)) goto rCompose_err;
     2441    if (nc_CallPlural((matrix)L->m[4].Data(),
     2442                      (matrix)L->m[5].Data(),
     2443                      NULL,NULL,
     2444                      R,
     2445                      true, // !!!
     2446                      true, false,
     2447                      currRing, FALSE)) goto rCompose_err;
    24422448    // takes care about non-comm. quotient! i.e. calls "nc_SetupQuotient" due to last true
    24432449  }
  • kernel/gring.cc

    rcdd964 re5a4ba  
    28882888
    28892889
    2890 BOOLEAN nc_CallPlural(
    2891                       matrix CCC, matrix DDD,
     2890
     2891/// returns TRUE if there were errors
     2892/// analyze inputs, check them for consistency
     2893/// detects nc_type, DO NOT initialize multiplication but call for it at the end
     2894/// checks the ordering condition and evtl. NDC
     2895/// NOTE: all the data belong to the curr,
     2896/// we change r which may be the same ring, and must have the same representation!
     2897BOOLEAN nc_CallPlural(matrix CCC, matrix DDD,
    28922898                      poly CCN, poly DDN,
    28932899                      ring r,
    28942900                      bool bSetupQuotient, bool bCopyInput, bool bBeQuiet,
    2895                       ring curr, BOOLEAN dummy_ring /*=FALSE*/)
    2896   /* returns TRUE if there were errors */
    2897   /* analyze inputs, check them for consistency */
    2898   /* detects nc_type, DO NOT initialize multiplication but call for it at the end*/
    2899   /* checks the ordering condition and evtl. NDC */
    2900 // NOTE: all the data belong to the curr,
    2901 // we change r which may be the same ring, and must have the same representation!
    2902 {
    2903   assume( r->qideal == NULL ); // The basering must NOT be a qring!
    2904 
    2905 //  assume( curr != r );
    2906   assume( rSamePolyRep(r, curr) );
     2901                      ring curr, bool dummy_ring /*=false*/)
     2902{
     2903  assume( r != NULL );
     2904  assume( curr != NULL );
     2905
     2906  if( !bSetupQuotient)
     2907    assume( (r->qideal == NULL) ); // The basering must NOT be a qring!??
     2908
     2909  assume( rSamePolyRep(r, curr) || bCopyInput ); // wrong assumption?
    29072910
    29082911
     
    29612964    rChangeCurrRing(r);
    29622965
    2963 #ifndef NDEBUG
    2964   idTest((ideal)CCC);
    2965   idTest((ideal)DDD);
    2966   pTest(CCN);
    2967   pTest(DDN);
    2968 #endif
    2969 
    29702966  matrix CC = NULL;
    29712967  poly CN = NULL;
     
    30543050      for(j=i+1; j<=r->N; j++)
    30553051        MATELEM(C,i,j) = prCopyR_NoSort(CN, curr, r); // nc_p_CopyPut(CN, r); // copy CN from curr into r
     3052
     3053#ifndef NDEBUG
     3054    idTest((ideal)C);
     3055#endif
     3056   
    30563057  } else
    30573058  if ( (CN == NULL) && (CC != NULL) ) /* copy matrix C */
     
    30913092    {
    30923093      C = mpCopy(CC, curr, r); // Copy C into r!!!???
     3094#ifndef NDEBUG
     3095      idTest((ideal)C);
     3096#endif
    30933097      bCnew = true;
    30943098    }
     
    31203124        for(j=i+1; j<=r->N; j++)
    31213125          MATELEM(D,i,j) = prCopyR_NoSort(DN, curr, r); // project DN into r->GetNC()->basering!
     3126#ifndef NDEBUG
     3127  idTest((ideal)D);
     3128#endif
    31223129  }
    31233130  else /* DD != NULL */
     
    31443151    {
    31453152      D = mpCopy(DD, curr, r); // Copy DD into r!!!
     3153#ifndef NDEBUG
     3154      idTest((ideal)D);
     3155#endif
    31463156      bDnew = true;
    31473157    }
    31483158    else
    31493159      D = DD;
    3150 
    31513160  }
    31523161
     
    31633172  Print("\nTemporary: type = %d, IsSkewConstant = %d\n", nctype, IsSkewConstant);
    31643173#endif
    3165 
    3166 
    31673174
    31683175
  • kernel/gring.h

    rcdd964 re5a4ba  
    2323                      bool bBeQuiet = false,
    2424                      ring curr = currRing,
    25                       BOOLEAN dummy_ring=FALSE
     25                      bool dummy_ring = false
    2626                      /* allow to create a nc-ring with 1 variable*/);
    2727
  • kernel/matpol.cc

    rcdd964 re5a4ba  
    109109  const ring save = currRing;
    110110
    111   if( save != currRing )
     111#ifndef NDEBUG
     112  if( currRing != rSrc )
    112113    rChangeCurrRing(rSrc);
    113 
    114114  idTest((ideal)a);
    115 
    116   rChangeCurrRing(rDst);
     115#endif
    117116
    118117  poly t;
     
    132131  b->rank=a->rank;
    133132
     133#ifndef NDEBUG
     134  if( currRing != rDst )
     135    rChangeCurrRing(rDst);
    134136  idTest((ideal)b);
     137#endif
    135138
    136139  if( save != currRing )
Note: See TracChangeset for help on using the changeset viewer.