Changeset 18ff4c in git for kernel/gring.cc


Ignore:
Timestamp:
Jul 25, 2007, 12:53:15 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
1da0b56138c1e89904888f80b4e46d2b5370e1e2
Parents:
19408ce627be07e5f06ea3acb902cb1deccb10af
Message:
*hannes: NF, code cleanup


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

Legend:

Unmodified
Added
Removed
  • kernel/gring.cc

    r19408c r18ff4c  
    77 *  Author:  levandov (Viktor Levandovsky)
    88 *  Created: 8/00 - 11/00
    9  *  Version: $Id: gring.cc,v 1.47 2007-07-24 16:22:36 motsak Exp $
     9 *  Version: $Id: gring.cc,v 1.48 2007-07-25 10:53:14 Singular Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    17271727  poly pp=nc_mm_Mult_pp(m,p,currRing);
    17281728  assume(pp!=NULL);
    1729  
     1729
    17301730  pDelete(&m);
    17311731  number n=nCopy(pGetCoeff(pp));
     
    17621762  PrintS(", ");
    17631763  pWrite0(p);
    1764   PrintS(", *c): "); 
    1765 #endif 
    1766  
     1764  PrintS(", *c): ");
     1765#endif
     1766
    17671767  // b will not by multiplied by any constant in this impl.
    17681768  // ==> *c=1
     
    17771777
    17781778//    poly pLmB = pHead(b);
    1779     poly m = pOne();   
     1779    poly m = pOne();
    17801780    pExpVectorDiff(m, b, p);
    17811781//    pDelete(&pLmB);
    17821782  //pSetm(m);
    1783    
     1783
    17841784#ifdef PDEBUG
    17851785    pTest(m);
     
    17871787#endif
    17881788
    1789     pp = nc_mm_Mult_pp(m, p, currRing); 
     1789    pp = nc_mm_Mult_pp(m, p, currRing);
    17901790
    17911791#if MYTEST
    1792     PrintS("\n{b': "); 
     1792    PrintS("\n{b': ");
    17931793    pWrite0(b);
    1794     PrintS(", m: "); 
     1794    PrintS(", m: ");
    17951795    pWrite0(m);
    1796     PrintS(", pp: "); 
    1797     pWrite0(pp); 
     1796    PrintS(", pp: ");
     1797    pWrite0(pp);
    17981798    PrintS(" }\n");
    1799 #endif     
     1799#endif
    18001800
    18011801    pDelete(&m); // one m for all tries!
    18021802
    18031803//    assume( pp != NULL );
    1804    
     1804
    18051805    if( pp == NULL )
    18061806    {
     
    18081808
    18091809      if( !p_DivisibleBy(p, b, currRing) )
    1810         return;     
    1811      
     1810        return;
     1811
    18121812    }
    18131813  }
    18141814
    18151815#if MYTEST
    1816   PrintS("{b': "); 
     1816  PrintS("{b': ");
    18171817  pWrite0(b);
    1818   PrintS(", pp: "); 
    1819   pWrite0(pp); 
     1818  PrintS(", pp: ");
     1819  pWrite0(pp);
    18201820  PrintS(" }\n");
    1821 #endif     
     1821#endif
    18221822
    18231823
     
    20772077        #endif
    20782078
    2079         q = kNF(J,currQuotient,q,0,4);
     2079        q = kNF(J,currQuotient,q,0,KSTD_NF_NONORM);
    20802080
    20812081        #ifdef PDEBUG
     
    24672467  pTest(DDN);
    24682468#endif
    2469  
     2469
    24702470  matrix CC = NULL;
    24712471  matrix DD = NULL;
     
    24932493  ring save = currRing;
    24942494  bool WeChangeRing = false;
    2495  
     2495
    24962496  if (currRing!=r)
    24972497  {
     
    25002500    WeChangeRing = true;
    25012501  }
    2502                    
     2502
    25032503  r->nc = (nc_struct *)omAlloc0(sizeof(nc_struct));
    25042504  r->nc->ref = 1;
     
    25172517  assume( (CCC != NULL) != (CCN != NULL) ); // exactly one data about coeffs (C).
    25182518  assume( !((DDD != NULL) && (DDN != NULL)) ); // at most one data about tails (D).
    2519  
     2519
    25202520  /* initialition of the matrix C */
    25212521  /* check the correctness of arguments */
     
    26102610        else
    26112611          qN = p_GetCoeff(MATELEM(C,i,j),r);
    2612        
     2612
    26132613        if ( qN == NULL )   /* check the consistency: Cij!=0 */
    26142614          // find also illegal pN
     
    26762676    return TRUE;
    26772677  }
    2678   r->nc->C = C; // if C and D were given by matrices at the beginning they are in r 
     2678  r->nc->C = C; // if C and D were given by matrices at the beginning they are in r
    26792679  r->nc->D = D; // otherwise they should be in r->nc->basering(polynomial * Id_{N})
    2680  
     2680
    26812681  if (WeChangeRing)
    26822682    rChangeCurrRing(save);
    2683  
     2683
    26842684  return nc_InitMultiplication(r);
    26852685}
Note: See TracChangeset for help on using the changeset viewer.