Changeset 050d1b in git


Ignore:
Timestamp:
Apr 4, 2012, 1:30:52 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
0a7d0ca68a61f160eb5b83774592a019ed99f025
Parents:
a76d6fe76b652b99d7b02e9ba874bb0c39294637
git-author:
Martin Lee <martinlee84@web.de>2012-04-04 13:30:52+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-04-04 15:02:12+02:00
Message:
fix: wrong/unneccessary asserts
Location:
factory
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_char.cc

    ra76d6fe r050d1b  
    7474int getGFDegree()
    7575{
    76     ASSERT( theDegree > 0, "not in GF(q)" );
     76    //ASSERT( theDegree > 0, "not in GF(q)" );
    7777    return theDegree;
    7878}
  • factory/cf_gcd_smallp.cc

    ra76d6fe r050d1b  
    39923992  Evaluation result= Evaluation (A.min(), A.max());
    39933993  ASSERT (A.min() == 2, "expected A.min() == 2");
    3994   ASSERT (A.max() == n, "expected A.max() == n");
     3994  ASSERT (A.max() >= n, "expected A.max() >= n");
    39953995  int max_deg;
    39963996  int k= n;
  • factory/cf_map_ext.cc

    ra76d6fe r050d1b  
    287287      if (buf == buf2) break;
    288288    }
    289     ASSERT (counter >= bound, "alpha is not primitive");
     289    ASSERT (counter <= bound, "alpha is not primitive");
    290290    if (pos == 0)
    291291    {
  • factory/facFqBivar.cc

    ra76d6fe r050d1b  
    145145{
    146146  Variable x= A.mvar();
    147   ASSERT (A.isUnivariate(), "univariate polynomial expected");
     147  ASSERT (A.isUnivariate() || A.inCoeffDomain(),
     148          "univariate polynomial expected or constant expected");
    148149  CFFList factorsA;
    149150  ZZ p= to_ZZ (getCharacteristic());
  • factory/facFqBivarUtil.cc

    ra76d6fe r050d1b  
    549549              )
    550550{
    551   ASSERT (A.size () - startIndex > 0, "wrong starting index");
    552   ASSERT (A.size () - startIndex == M.rows(), "wrong starting index");
     551  ASSERT (A.size () - startIndex >= 0, "wrong starting index");
     552  ASSERT (A.size () - startIndex <= M.rows(), "wrong starting index");
    553553  ASSERT (column > 0 && column <= M.columns(), "wrong column");
    554554  if (A.size() - startIndex <= 0) return;
     
    560560CFArray getCoeffs (const CanonicalForm& F, const int k)
    561561{
    562   ASSERT (F.isUnivariate(), "univariate input expected");
     562  ASSERT (F.isUnivariate() || F.inCoeffDomain(), "univariate input expected");
    563563  if (degree (F, 2) < k)
    564564    return CFArray();
     
    583583CFArray getCoeffs (const CanonicalForm& F, const int k, const Variable& alpha)
    584584{
    585   ASSERT (F.isUnivariate(), "univariate input expected");
     585  ASSERT (F.isUnivariate() || F.inCoeffDomain(), "univariate input expected");
    586586  if (degree (F, 2) < k)
    587587    return CFArray ();
     
    626626           const mat_zz_p& M)
    627627{
    628   ASSERT (G.isUnivariate(), "univariate input expected");
     628  ASSERT (G.isUnivariate() || G.inCoeffDomain(), "univariate input expected");
    629629  CanonicalForm F= G (G.mvar() - evaluation, G.mvar());
    630630  if (F.isZero())
  • factory/facMul.cc

    ra76d6fe r050d1b  
    24222422{
    24232423  ASSERT (getCharacteristic() > 0, "positive characteristic expected");
    2424   ASSERT (CFFactory::gettype() != GaloisFieldDomain, "no GF expected");
    24252424
    24262425  CanonicalForm A= mod (F, M);
     
    25752574    return;
    25762575  }
    2577   ASSERT (2*degB > degA, "expected degree (F, 1) < 2*degree (G, 1)");
    25782576  if (degB < 1)
    25792577  {
     
    25832581    return;
    25842582  }
    2585 
    25862583  int m= (int) ceil ((double) (degB + 1)/2.0) + 1;
     2584  ASSERT (4*m >= degA, "expected degree (F, 1) < 2*degree (G, 1)");
    25872585  CFList splitA= split (A, m, x);
    25882586  if (splitA.length() == 3)
     
    26472645    return;
    26482646  }
    2649   ASSERT (3*(degB/2) > degA, "expected degree (F, 1) < 3*(degree (G, 1)/2)");
    26502647  if (degB < 1)
    26512648  {
     
    26562653  }
    26572654  int m= (int) ceil ((double) (degB + 1)/ 2.0);
    2658 
     2655  ASSERT (3*m > degA, "expected degree (F, 1) < 3*degree (G, 1)");
    26592656  CFList splitA= split (A, m, x);
    26602657  CFList splitB= split (B, m, x);
  • factory/variable.cc

    ra76d6fe r050d1b  
    161161Variable rootOf( const CanonicalForm & mipo, char name )
    162162{
    163     ASSERT (mipo.inPolyDomain() && mipo.isUnivariate(), "not a legal extension");
     163    ASSERT (mipo.isUnivariate(), "not a legal extension");
    164164
    165165    int l;
Note: See TracChangeset for help on using the changeset viewer.