Changeset 0ffdec in git


Ignore:
Timestamp:
Apr 19, 2011, 11:39:03 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '79dfb9a6d258bfeb991428bdb25b8f55e9e809b2')
Children:
f27003fd89ac86ed0bd7cc93a1342d129926c00c
Parents:
4f684a7f137cff04239a5a3fa6eb3dafd2cc5084
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-04-19 11:39:03+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:17+01:00
Message:
fix pDebug
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/pDebug.cc

    r4f684a r0ffdec  
    1717
    1818#include "config.h"
     19#include <misc/auxiliary.h>
    1920#ifdef PDEBUG
    2021
     
    2425
    2526//#include <polys/monomials/p_polys.h>
    26 #include <output.h>
     27//#include <output.h>
    2728#include <omalloc/omalloc.h>
    2829#include <polys/monomials/ring.h>
     30#include <polys/monomials/p_polys.h>
    2931#include <coeffs/coeffs.h>
    3032
     
    4951  if (p != NULL)
    5052  {
    51     if (r == currRing)
    52     {
    53       fprintf(stderr, " occured for poly: ");
    54       p_wrp(p, r);
    55       omPrintAddrInfo(stderr, p, " ");
    56     }
    57     else
    58     {
    59       omPrintAddrInfo(stderr, p, " occured for poly: ");
    60     }
     53    fprintf(stderr, " occured for poly: ");
     54    p_wrp(p, r);
     55    omPrintAddrInfo(stderr, p, " ");
    6156  }
    6257  dErrorBreak();
     
    9085    #endif
    9186    {
    92       pPolyAssumeReturn(omIsBinPageAddr(p) && omSizeWOfAddr(p)==r->PolyBin->sizeW,p,r);
     87      _pPolyAssumeReturn(omIsBinPageAddr(p) && omSizeWOfAddr(p)==r->PolyBin->sizeW,p,r);
    9388      return TRUE;
    9489    }
     
    143138  while (i);
    144139#ifdef HAVE_RINGS
    145   return nDivBy(pGetCoeff(b), pGetCoeff(a));
     140  return n_DivBy(pGetCoeff(b), pGetCoeff(a), r->cf);
    146141#else
    147142  return TRUE;
     
    213208  #ifndef OM_NDEBUG
    214209  // check addr with level+1 so as to check bin/page of addr
    215   pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r->PolyBin->sizeW)*SIZEOF_LONG, level+1)
     210  _pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r->PolyBin->sizeW)*SIZEOF_LONG, level+1)
    216211                        == omError_NoError, "memory error",p,r);
    217212  #endif
     
    233228    #ifndef OM_NDEBUG
    234229    // omAddr check
    235     pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r->PolyBin->sizeW)*SIZEOF_LONG, 1)
     230    _pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r->PolyBin->sizeW)*SIZEOF_LONG, 1)
    236231                     == omError_NoError, "memory error",p,r);
    237232    #endif
    238233    // number/coef check
    239     pPolyAssumeReturnMsg(p->coef != NULL || (n_GetChar(r) >= 2), "NULL coef",p,r);
     234    _pPolyAssumeReturnMsg(p->coef != NULL || (n_GetChar(r->cf) >= 2), "NULL coef",p,r);
    240235    #ifdef LDEBUG
    241     r->cf->nDBTest(p->coef,__FILE__,__LINE__);
     236    r->cf->cfDBTest(p->coef,__FILE__,__LINE__,r->cf);
    242237    #endif
    243     pPolyAssumeReturnMsg(!n_IsZero(p->coef, r), "Zero coef",p,r);
     238    _pPolyAssumeReturnMsg(!n_IsZero(p->coef, r->cf), "Zero coef",p,r);
    244239
    245240    // check for valid comp
    246     pPolyAssumeReturnMsg(p_GetComp(p, r) >= 0 && (p_GetComp(p, r)<65000), "component out of range ?",p,r);
     241    _pPolyAssumeReturnMsg(p_GetComp(p, r) >= 0 && (p_GetComp(p, r)<65000), "component out of range ?",p,r);
    247242    // check for mix poly/vec representation
    248     pPolyAssumeReturnMsg(ismod == (p_GetComp(p, r) != 0), "mixed poly/vector",p,r);
     243    _pPolyAssumeReturnMsg(ismod == (p_GetComp(p, r) != 0), "mixed poly/vector",p,r);
    249244
    250245    // special check for ringorder_s/S
     
    261256      }
    262257      else { cc1=0; ccc1=0; }
    263       pPolyAssumeReturnMsg(c1 == 0 || cc1 != 0, "Component <-> TrueComponent zero mismatch",p,r);
    264       pPolyAssumeReturnMsg(c1 == 0 || ccc1 != 0,"Component <-> ShiftedComponent zero mismatch",p,r);
     258      _pPolyAssumeReturnMsg(c1 == 0 || cc1 != 0, "Component <-> TrueComponent zero mismatch",p,r);
     259      _pPolyAssumeReturnMsg(c1 == 0 || ccc1 != 0,"Component <-> ShiftedComponent zero mismatch",p,r);
    265260      ec1 = p->exp[o->data.syzcomp.place];
    266261      //pPolyAssumeReturnMsg(ec1 == ccc1, "Shifted comp out of sync. should %d, is %d");
     
    276271    {
    277272      poly p_should_equal = p_DebugInit(p, r, r);
    278       pPolyAssumeReturnMsg(p_ExpVectorEqual(p, p_should_equal, r), "p_Setm field(s) out of sync",p,r);
     273      _pPolyAssumeReturnMsg(p_ExpVectorEqual(p, p_should_equal, r), "p_Setm field(s) out of sync",p,r);
    279274      p_LmFree(p_should_equal, r);
    280275    }
     
    286281      if (cmp == 0)
    287282      {
    288         pPolyAssumeReturnMsg(0, "monoms p and p->next are equal", p_prev, r);
     283        _pPolyAssumeReturnMsg(0, "monoms p and p->next are equal", p_prev, r);
    289284      }
    290285      else
    291         pPolyAssumeReturnMsg(p_LmCmp(p_prev, p, r) == 1, "wrong order", p_prev, r);
     286        _pPolyAssumeReturnMsg(p_LmCmp(p_prev, p, r) == 1, "wrong order", p_prev, r);
    292287
    293288      // check that compare worked sensibly
     
    299294          if (p_GetExp(p_prev, i, r) != p_GetExp(p, i, r)) break;
    300295        }
    301         pPolyAssumeReturnMsg(i > 0, "Exponents equal but compare different", p_prev, r);
     296        _pPolyAssumeReturnMsg(i > 0, "Exponents equal but compare different", p_prev, r);
    302297      }
    303298    }
     
    353348                               poly p2, unsigned long not_sev_2, ring r_2)
    354349{
    355   pPolyAssume(p_GetShortExpVector(p1, r_1) == sev_1, p1, r_1);
    356   pPolyAssume(p_GetShortExpVector(p2, r_2) == ~ not_sev_2, p2, r_2);
     350  _pPolyAssume(p_GetShortExpVector(p1, r_1) == sev_1, p1, r_1);
     351  _pPolyAssume(p_GetShortExpVector(p2, r_2) == ~ not_sev_2, p2, r_2);
    357352
    358353  pDivisibleBy_number++;
Note: See TracChangeset for help on using the changeset viewer.