Changeset bca341 in git


Ignore:
Timestamp:
Jun 7, 2012, 5:43:32 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
f0b795a3ce2b873e7524b0af7df2ccd84a3fc628
Parents:
6284186fbb128f1c5a0c99ff170cec4bb5afd5a3
Message:
fix: naIsOne, naIsMOne

improved: algext.cc::definiteReduce
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r628418 rbca341  
    4949/* #define WITH_OLD_MINOR */
    5050#define pCopy_noCheck(p) pCopy(p)
    51 
    52 static poly * idpower;
    53 /*collects the monomials in makemonoms, must be allocated befor*/
    54 static int idpowerpoint;
    55 /*index of the actual monomial in idpower*/
    56 static poly * givenideal;
    57 /*the ideal from which a power is computed*/
    5851
    5952/*0 implementation*/
     
    546539  ideal   h2, h3;
    547540  int     i;
    548   int     j,jj=0,k;
     541  int     j,k;
    549542  poly    p,q;
    550543
     
    641634{
    642635  ideal s_h1;
    643   poly  p;
    644636  int   j, k, length=0,reg;
    645637  BOOLEAN isMonomial=TRUE;
     
    789781{
    790782  ideal s_h1;
    791   int j;
    792783  intvec *w=NULL;
    793784
     
    837828{
    838829  int   i, j, k, t, inputIsIdeal=id_RankFreeModule(h1,currRing);
    839   poly  p=NULL, q, qq;
     830  poly  p=NULL, q;
    840831  intvec *w=NULL;
    841832
     
    12521243          p=pJetW(pSub(p,ppMult_mm(Q->m[j],p0)),N,w);
    12531244        pNormalize(p);
    1254         if((w==NULL)&&(p_Deg(p0,currRing)>n)||(w!=NULL)&&(pDegW(p0,w)>n))
     1245        if(((w==NULL)&&(p_Deg(p0,currRing)>n))||((w!=NULL)&&(pDegW(p0,w)>n)))
    12551246          p_Delete(&p0,currRing);
    12561247        else
     
    14081399  }
    14091400  BITSET old_test=test;
    1410   int i,l,ll,k,kkk,kmax;
     1401  int i, kmax;
    14111402  BOOLEAN  addOnlyOne=TRUE;
    14121403  tHomog   hom=isNotHomog;
     
    19761967  {
    19771968    p=P[i];
    1978     poly q=p;
    19791969    if (p!=NULL)
    19801970    {
     
    21072097  intvec *wtmp=NULL;
    21082098
    2109   int i,j,k,rk,flength=0,slength,length;
     2099  int i,k,rk,flength=0,slength,length;
    21102100  poly p,q;
    21112101
  • libpolys/coeffs/bigintmat.cc

    r628418 rbca341  
    1515#include <string.h>
    1616
    17 #define BIMATELEM(M,I,J) (M)[ (M).index(I,J) ]
     17//#define BIMATELEM(M,I,J) (M)[ (M).index(I,J) ]
    1818
    1919bigintmat * bigintmat::transpose()
  • libpolys/polys/ext_fields/algext.cc

    r628418 rbca341  
    206206  naTest(a);
    207207  poly aAsPoly = (poly)a;
    208   if (!p_IsConstant(aAsPoly, naRing)) return FALSE;
     208  if ((a==NULL) || (!p_IsConstant(aAsPoly, naRing))) return FALSE;
    209209  return n_IsOne(p_GetCoeff(aAsPoly, naRing), naCoeffs);
    210210}
     
    214214  naTest(a);
    215215  poly aAsPoly = (poly)a;
    216   if (!p_IsConstant(aAsPoly, naRing)) return FALSE;
     216  if ((a==NULL) || (!p_IsConstant(aAsPoly, naRing))) return FALSE;
    217217  return n_IsMOne(p_GetCoeff(aAsPoly, naRing), naCoeffs);
    218218}
     
    600600  p_Test((poly)reducer, naRing);
    601601  #endif
    602   p_PolyDiv(p, reducer, FALSE, naRing);
     602  if ((p!=NULL) && (p_GetExp(p,1,naRing)>=p_GetExp(reducer,1,naRing)))
     603  {
     604    p_PolyDiv(p, reducer, FALSE, naRing);
     605  }
    603606}
    604607
Note: See TracChangeset for help on using the changeset viewer.