Changeset 7ddfab in git


Ignore:
Timestamp:
Jul 13, 2018, 3:51:16 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
55b29ffa7e5ceaaf5e8681e442c601fdf88fd855
Parents:
0612fd84c8ed63efc96d7b8645ceb1f37b32cd17
Message:
LObject::CanonicalizeP/Normalize
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kInline.h

    r0612fd r7ddfab  
    334334    pNormalize(p);
    335335  }
     336  if (bucket!=NULL) kBucketNormalize(bucket);
     337}
     338
     339KINLINE void sLObject::CanonicalizeP()
     340{
     341  if (bucket != NULL)
     342    kBucketCanonicalize(bucket);
    336343}
    337344
     
    638645  Set(pn, tailRing);
    639646  return ret;
    640 }
    641 
    642 KINLINE poly sLObject::CanonicalizeP()
    643 {
    644   //kTest_L(this);
    645   int i = -1;
    646 
    647   if (bucket != NULL)
    648     i = kBucketCanonicalize(bucket);
    649 
    650   if (p == NULL)
    651     p = k_LmInit_tailRing_2_currRing(t_p, tailRing);
    652 
    653   if (i >= 0) pNext(p) = bucket->buckets[i];
    654   return p;
    655647}
    656648
  • kernel/GBEngine/kstd1.cc

    r0612fd r7ddfab  
    993993  if (L->bucket != NULL)
    994994  {
    995     poly p = L->CanonicalizeP();
    996     BOOLEAN ret = hasPurePower(p, last, length, strat);
    997     pNext(p) = NULL;
    998     return ret;
     995    poly p = L->GetP();
     996    return hasPurePower(p, last, length, strat);
    999997  }
    1000998  else
  • kernel/GBEngine/kutil.h

    r0612fd r7ddfab  
    220220  // does not delete bucket, just canonicalizes it
    221221  // returned poly is such that Lm(p) \in currRing, Tail(p) \in tailRing
    222   KINLINE poly CanonicalizeP();
     222  KINLINE void CanonicalizeP();
    223223
    224224  // makes a copy of the poly of L
  • libpolys/polys/kbuckets.cc

    r0612fd r7ddfab  
    369369int kBucketCanonicalize(kBucket_pt bucket)
    370370{
     371#ifndef HAVE_PSEUDO_BUCKETS
    371372  assume(bucket->buckets_used<=MAX_BUCKET);
    372373  MULTIPLY_BUCKET(bucket,1);
     
    438439  kbTest(bucket);
    439440  return i;
     441#endif
     442}
     443
     444void kBucketNormalize(kBucket_pt bucket)
     445{
     446#ifdef HAVE_PSEUDO_BUCKETS
     447  p_Normalize(bucket->p,bucket->bucket_ring);
     448#else
     449  MULTIPLY_BUCKET(bucket,1);
     450  for (int i=0; i<=bucket->buckets_used; i++)
     451  {
     452    p_Normalize(bucket->buckets[i],bucket->bucket_ring);
     453  }
     454#endif
    440455}
    441456
  • libpolys/polys/kbuckets.h

    r0612fd r7ddfab  
    4848}
    4949
    50 // Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in
    51 // one bucket: Returns number of bucket into which it is canonicalized
     50/// Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in
     51/// one bucket: Returns number of bucket into which it is canonicalized
    5252int kBucketCanonicalize(kBucket_pt bucket);
     53
     54/// apply n_Normalize to all coefficients
     55void kBucketNormalize(kBucket_pt bucket);
    5356
    5457/////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.