Changeset 096c99 in git


Ignore:
Timestamp:
Mar 23, 2010, 6:35:47 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
d74b8967391eb5c1380bca8bf952757c82ee77d5
Parents:
56bd6aa9cdcf293c5733c2de7e00ae0d0784f36b
Message:
removed some NULL tests

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

Legend:

Unmodified
Added
Removed
  • kernel/sca.cc

    r56bd6a r096c99  
    6060
    6161// return pMonom * pPoly; preserve pPoly and pMonom.
    62 poly sca_mm_Mult_pp(const poly pMonom, const poly pPoly, const ring rRing);
     62static poly sca_mm_Mult_pp(const poly pMonom, const poly pPoly, const ring rRing);
    6363
    6464// return pPoly * pMonom; preserve pMonom, destroy or reuse pPoly.
     
    6666
    6767// return pMonom * pPoly; preserve pMonom, destroy or reuse pPoly.
    68 poly sca_mm_Mult_p(const poly pMonom, poly pPoly, const ring rRing);
     68static poly sca_mm_Mult_p(const poly pMonom, poly pPoly, const ring rRing);
    6969
    7070
     
    8989
    9090
    91 inline ring assureCurrentRing(ring r)
     91static inline ring assureCurrentRing(ring r)
    9292{
    9393  ring save = currRing;
     
    103103// returns the sign of: lm(pMonomM) * lm(pMonomMM),
    104104// preserves input, may return +/-1, 0
    105 inline int sca_Sign_mm_Mult_mm( const poly pMonomM, const poly pMonomMM, const ring rRing )
     105static inline int sca_Sign_mm_Mult_mm( const poly pMonomM, const poly pMonomMM, const ring rRing )
    106106{
    107107#ifdef PDEBUG
     
    154154// if result != NULL => next(result) = next(pMonomM), lt(result) = lt(pMonomM) * lt(pMonomMM)
    155155// if result == NULL => pMonomM MUST BE deleted manually!
    156 inline poly sca_m_Mult_mm( poly pMonomM, const poly pMonomMM, const ring rRing )
     156static inline poly sca_m_Mult_mm( poly pMonomM, const poly pMonomMM, const ring rRing )
    157157{
    158158#ifdef PDEBUG
     
    218218// if result != NULL => next(result) = next(pMonomM), lt(result) = lt(pMonomMM) * lt(pMonomM)
    219219// if result == NULL => pMonomM MUST BE deleted manually!
    220 inline poly sca_mm_Mult_m( const poly pMonomMM, poly pMonomM, const ring rRing )
     220static inline poly sca_mm_Mult_m( const poly pMonomMM, poly pMonomM, const ring rRing )
    221221{
    222222#ifdef PDEBUG
     
    283283// preserves pMonom1, pMonom2. may return NULL!
    284284// if result != NULL => next(result) = NULL, lt(result) = lt(pMonom1) * lt(pMonom2)
    285 inline poly sca_mm_Mult_mm( poly pMonom1, const poly pMonom2, const ring rRing )
     285static inline poly sca_mm_Mult_mm( poly pMonom1, const poly pMonom2, const ring rRing )
    286286{
    287287#ifdef PDEBUG
     
    322322
    323323    poly pResult;
    324     omTypeAllocBin(poly, pResult, rRing->PolyBin);
    325     p_SetRingOfLm(pResult, rRing);
     324    p_AllocBin(pResult,rRing->PolyBin,rRing);
    326325
    327326    p_ExpVectorSum(pResult, pMonom1, pMonom2, rRing); // "exponents" are additive!!!
     
    349348// preserves pMonom. may return NULL!
    350349// if result != NULL => next(result) = NULL, lt(result) = x_i * lt(pMonom)
    351 inline poly sca_xi_Mult_mm(unsigned int i, const poly pMonom, const ring rRing)
     350static inline poly sca_xi_Mult_mm(unsigned int i, const poly pMonom, const ring rRing)
    352351{
    353352#ifdef PDEBUG
     
    408407    return NULL;
    409408
    410   if( pMonom == NULL )
    411   {
    412     // pPoly != NULL =>
    413     p_Delete( &pPoly, rRing );
    414 
    415     return NULL;
    416   }
     409  assume(pMonom !=NULL);
     410  //if( pMonom == NULL )
     411  //{
     412  //  // pPoly != NULL =>
     413  //  p_Delete( &pPoly, rRing );
     414  //  return NULL;
     415  //}
    417416
    418417  const int iComponentMonomM = p_GetComp(pMonom, rRing);
     
    470469        break;
    471470    }
    472 
    473 
    474471  }
    475472
     
    493490#endif
    494491
    495   if( ( pPoly == NULL ) || ( pMonom == NULL ) )
     492  if( ( pPoly == NULL ) /*|| ( pMonom == NULL )*/ )
    496493    return NULL;
    497494
     
    536533      ppPrev = &pNext(v);
    537534    }
    538 
    539535  }
    540536
     
    549545
    550546// return x_i * pPoly; preserve pPoly.
    551 inline poly sca_xi_Mult_pp(unsigned int i, const poly pPoly, const ring rRing)
     547static inline poly sca_xi_Mult_pp(unsigned int i, const poly pPoly, const ring rRing)
    552548{
    553549  assume( rIsSCA(rRing) );
     
    593589
    594590// return new poly = pMonom * pPoly; preserve pPoly and pMonom.
    595 poly sca_mm_Mult_pp(const poly pMonom, const poly pPoly, const ring rRing)
     591static poly sca_mm_Mult_pp(const poly pMonom, const poly pPoly, const ring rRing)
    596592{
    597593  assume( rIsSCA(rRing) );
     
    659655
    660656// return poly = pMonom * pPoly; preserve pMonom, destroy or reuse pPoly.
    661 poly sca_mm_Mult_p(const poly pMonom, poly pPoly, const ring rRing) // !!!!! the MOST used procedure !!!!!
     657static poly sca_mm_Mult_p(const poly pMonom, poly pPoly, const ring rRing) // !!!!! the MOST used procedure !!!!!
    662658{
    663659  assume( rIsSCA(rRing) );
     
    671667    return NULL;
    672668
    673   if( pMonom == NULL )
    674   {
    675     // pPoly != NULL =>
    676     p_Delete( &pPoly, rRing );
    677     return NULL;
    678   }
     669  assume(pMonom!=NULL);
     670  //if( pMonom == NULL )
     671  //{
     672  //  // pPoly != NULL =>
     673  //  p_Delete( &pPoly, rRing );
     674  //  return NULL;
     675  //}
    679676
    680677  const int iComponentMonomM = p_GetComp(pMonom, rRing);
     
    25492546// x-es and y-s are weighted by wx and wy resp.
    25502547// [optional] components have weights by wCx and wCy.
    2551 inline void m_GetBiDegree(const poly m,
     2548static inline void m_GetBiDegree(const poly m,
    25522549  const intvec *wx, const intvec *wy,
    25532550  const intvec *wCx, const intvec *wCy,
     
    27132710// reduce term lt(m) modulo <y_i^2> , i = iFirstAltVar .. iLastAltVar:
    27142711// either create a copy of m or return NULL
    2715 inline poly m_KillSquares(const poly m,
     2712static inline poly m_KillSquares(const poly m,
    27162713  const unsigned int iFirstAltVar, const unsigned int iLastAltVar,
    27172714  const ring r)
Note: See TracChangeset for help on using the changeset viewer.