Changeset 009d80 in git for kernel/kspoly.cc


Ignore:
Timestamp:
May 10, 2007, 10:12:44 AM (16 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
4cd2f891f36b9e1d58f0aeaa4683254f54088298
Parents:
4bebba7353438f052b4ad581ede34fa6f31e5a71
Message:
new compile switch: HAVE_RINGS
at total there are now: HAVE_RINGS, HAVE_RING2TOM, HAVE_RINGMODN

kspoly.cc, kstd1.cc, kstd2.cc, kutil.cc, kspoly.cc, polys.cc, ring.*:
adaption of new switches and rField_is_Ring method

numbers.*:
introduced new operation:
  nDivBy(a, b) = Is a divisible by b?

pDebig.cc, pInline1.h:
use of new nDivBy method

p_Mult_q:
new routine for rings

p_*, pp_*:
template switch HAVE_ZERODIVISOR

polys1.cc:
poly exponentation, switches

rmodulo*:
nDivBy implementation, DBTest

structs.h:
nDivBy, ringtype, ringflaga, ringflagb


git-svn-id: file:///usr/local/Singular/svn/trunk@10029 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/kspoly.cc

    r4bebba r009d80  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kspoly.cc,v 1.9 2007-02-07 10:49:40 Singular Exp $ */
     4/* $Id: kspoly.cc,v 1.10 2007-05-10 08:12:40 wienand Exp $ */
    55/*
    66*  ABSTRACT -  Routines for Spoly creation and reductions
     
    213213  else
    214214    a2 = tailRing->p_Procs->pp_Mult_mm(a2, m2, tailRing,last);
    215 #ifdef HAVE_RING2TOM
    216   if (currRing->cring == 1) l2 = pLength(a2);
     215#ifdef HAVE_RINGS
     216  if (rField_is_Ring(currRing)) l2 = pLength(a2);
    217217#endif
    218218
     
    350350  BOOLEAN equal;
    351351
    352 #ifdef HAVE_RING2TOM
     352#ifdef HAVE_RINGS
    353353  number lc1 = pGetCoeff(p1), lc2 = pGetCoeff(p2);
    354354  int ct = ksCheckCoeff(&lc1, &lc2); // gcd and zero divisors
    355   if (currRing->cring == 1)
     355  if (rField_is_Ring(currRing))
    356356  {
    357357    if (a1 != NULL) t2 = nMult(pGetCoeff(a1),lc2);
     
    397397      }
    398398      p_Setm(m2, currRing);
    399 #ifdef HAVE_RING2TOM
    400       if (currRing->cring == 1)
     399#ifdef HAVE_RINGS
     400      if (rField_is_Ring(currRing))
    401401          pSetCoeff(m2, t1);
    402402      else
     
    433433    }
    434434    p_Setm(m1, currRing);
    435 #ifdef HAVE_RING2TOM
    436     if (currRing->cring == 1)
     435#ifdef HAVE_RINGS
     436      if (rField_is_Ring(currRing))
    437437        pSetCoeff(m1, t2);
    438438    else
     
    485485      {
    486486        p_LmFree(m2,currRing);
    487 #ifdef HAVE_RING2TOM
    488         if (currRing->cring == 1)
     487#ifdef HAVE_RINGS
     488        if (rField_is_Ring(currRing))
    489489          pSetCoeff(m1, t2);
    490490        else
     
    496496      {
    497497        p_LmFree(m1,currRing);
    498 #ifdef HAVE_RING2TOM
    499         if (currRing->cring == 1)
     498#ifdef HAVE_RINGS
     499        if (rField_is_Ring(currRing))
    500500            pSetCoeff(m2, t1);
    501501        else
     
    505505      }
    506506    }
    507 #ifdef HAVE_RING2TOM
    508     if (currRing->cring == 1)
     507#ifdef HAVE_RINGS
     508    if (rField_is_Ring(currRing))
    509509    {
    510510      t1 = nSub(t1, t2);
     
    524524    {
    525525      p_LmFree(m2,currRing);
    526 #ifdef HAVE_RING2TOM
    527       if (currRing->cring == 1)
     526#ifdef HAVE_RINGS
     527      if (rField_is_Ring(currRing))
    528528          pSetCoeff(m1, t1);
    529529      else
     
    534534    pIter(a1);
    535535    pIter(a2);
    536 #ifdef HAVE_RING2TOM
    537     if (currRing->cring == 1)
     536#ifdef HAVE_RINGS
     537    if (rField_is_Ring(currRing))
    538538    {
    539539      nDelete(&t1);
Note: See TracChangeset for help on using the changeset viewer.