Changeset 07f2e1c in git


Ignore:
Timestamp:
Apr 8, 2011, 1:23:08 PM (13 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
0b301eb684d2361d4bbb42f05cd0cca8ee0ea520
Parents:
387e4ad0de2bde1bd0f45d858db7cfac490e8600
Message:
enabled preimage over (same) ground rings (fix for ticket #326)

git-svn-id: file:///usr/local/Singular/svn/trunk@14121 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/maps.cc

    r387e4a r07f2e1c  
    231231  if (nSetMap(theImageRing) != nCopy)
    232232  {
    233     Werror("Coefficient fields must be equal");
     233    Werror("Coefficient fields/rings must be equal");
    234234    return NULL;
    235235  }
  • kernel/numbers.cc

    r387e4a r07f2e1c  
    160160    nInit_bigint=nr2mMapQ;
    161161  }
    162   /*----------------------ring Z / 2^m----------------*/
     162  /*----------------------ring Z ----------------*/
    163163  else if (rField_is_Ring_Z(r))
    164164  {
     
    364364     nr2mInitExp(c,r);
    365365     n->cfInit = nr2mInit;
    366      n->nCopy  = ndCopy;
     366     n->nCopy  = nr2mCopy;
    367367     n->n_Int  = nr2mInt;
    368368     n->nAdd   = nr2mAdd;
  • kernel/ring.cc

    r387e4a r07f2e1c  
    923923          if (i!=len)
    924924          {
    925             tmpR.parameter=(char**)omReallocSize(tmpR.parameter,len*sizeof(char_ptr),i*sizeof(char_ptr));
     925            tmpR.parameter=(char**)omReallocSize(tmpR.parameter,
     926                                                 len*sizeof(char_ptr),
     927                                                 i*sizeof(char_ptr));
    926928          }
    927929          tmpR.P=i;
     
    932934    else if (rField_is_Ring(r1)||rField_is_Ring(r2))
    933935    {
    934       Werror("rSumInternal for rings coeffs");
    935       return -1;
     936      if (r1->ringtype != r2->ringtype)
     937      {
     938        Werror("rSumInternal not yet implemented for %s",
     939               "different coefficient rings");
     940        return -1;
     941      }
     942      else
     943      {
     944        tmpR.ch        = rInternalChar(r1);
     945        tmpR.ringtype  = r1->ringtype;
     946        if (r1->ringflaga != NULL)
     947        {
     948          omBin tmpBin = omGetSpecBin(sizeof(mpz_t));
     949          tmpR.ringflaga = (int_number)omAllocBin(tmpBin);
     950          mpz_init_set(tmpR.ringflaga, (int_number)r1->ringflaga);
     951        }
     952        tmpR.ringflagb = r1->ringflagb;
     953        tmpR.nr2mModul = r1->nr2mModul;
     954        if (r1->nrnModul != NULL)
     955        {
     956          omBin tmpBin = omGetSpecBin(sizeof(mpz_t));
     957          tmpR.nrnModul = (int_number)omAllocBin(tmpBin);
     958          mpz_init_set(tmpR.nrnModul, (int_number)r1->nrnModul);
     959        }
     960      }
    936961    }
    937962    #endif
     
    12791304      }
    12801305    }
    1281     else if ((k==rVar(r1)) && (k==rVar(r2))) /* r1 and r2 are "quite" the same ring */
     1306    else if ((k==rVar(r1)) && (k==rVar(r2))) /* r1 and r2 are "quite"
     1307                                                the same ring */
    12821308      /* copy r1, because we have the variables from r1 */
    12831309    {
     
    13901416      idTest((ideal)C);
    13911417
    1392       nMapFunc nMap1 = nSetMap(R1); // can change something global: not usable after the next nSetMap call :(
     1418      nMapFunc nMap1 = nSetMap(R1); /* can change something global: not usable
     1419                                       after the next nSetMap call :( */
    13931420      // Create blocked C and D matrices:
    13941421      for (i=1; i<= rVar(R1); i++)
     
    14061433
    14071434
    1408       nMapFunc nMap2 = nSetMap(R2); // can change something global: not usable after the next nSetMap call :(
     1435      nMapFunc nMap2 = nSetMap(R2); /* can change something global: not usable
     1436                                       after the next nSetMap call :( */
    14091437      for (i=1; i<= rVar(R2); i++)
    14101438        for (j=i+1; j<=rVar(R2); j++)
  • kernel/rmodulo2m.cc

    r387e4a r07f2e1c  
    460460}
    461461
     462number nr2mCopy(number a)
     463{
     464  return a;
     465}
     466
    462467number nr2mMapMachineInt(number from)
    463468{
     
    515520     && (src->ringflagb >= dst->ringflagb))
    516521  {
    517     return nr2mMapMachineInt;
     522    return nr2mCopy;
    518523  }
    519524  if (rField_is_Ring_Z(src))
  • kernel/rmodulo2m.h

    r387e4a r07f2e1c  
    1515                               bit pattern '11..1' of length m */
    1616
     17number  nr2mCopy        (number a);
    1718BOOLEAN nr2mGreaterZero (number k);
    1819number  nr2mMult        (number a, number b);
  • kernel/rmodulon.cc

    r387e4a r07f2e1c  
    428428    if (   (src->ringtype > 0)
    429429        && (mpz_cmp(src->ringflaga, dst->ringflaga) == 0)
    430         && (src->ringflagb == dst->ringflagb)) return nrnMapGMP;
     430        && (src->ringflagb == dst->ringflagb)) return nrnCopy;
    431431    else
    432432    {
Note: See TracChangeset for help on using the changeset viewer.