Changeset 6d09f28 in git for kernel/kstd2.cc


Ignore:
Timestamp:
Aug 14, 2006, 7:08:37 PM (18 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
d39ce40a2e8c985712a746d769cc723fe80f080f
Parents:
2a5c2f4b88044ea4f445da171e3d11679bd20548
Message:
introduced def HAVE_VANGB
--> compute GB in the ring of function rather than polynomials

kstd2.cc:
* moved ind2 and ind_fact_2 to kutil.h/cc
* bba: enterpairs changes size of T in VANGB case

kutil.h/cc:
* ind2/ind_fact_2 see above
* kCreateZeroPoly: create a zero polynomial with given exponent
* createG0: creates the groebner basis of the vanishing polynomials


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

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    r2a5c2f4 r6d09f28  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.17 2006-06-07 18:44:23 wienand Exp $ */
     4/* $Id: kstd2.cc,v 1.18 2006-08-14 17:08:36 wienand Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    186186}
    187187
    188 long ind2(long arg)
    189 {
    190   long ind = 0;
    191   if (arg <= 0) return 0;
    192   while (arg%2 == 0)
    193   {
    194     arg = arg / 2;
    195     ind++;
    196   }
    197   return ind;
    198 }
    199 
    200 long ind_fact_2(long arg)
    201 {
    202   long ind = 0;
    203   if (arg <= 0) return 0;
    204   if (arg%2 == 1) { arg--; }
    205   while (arg > 0)
    206   {
    207     ind += ind2(arg);
    208     arg = arg - 2;
    209   }
    210   return ind;
    211 }
    212 
    213188poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
    214189{
     
    225200
    226201  long k = 1;
    227   // of interest is only k_ind2, special routine for improvement ... TOTO OLIVER
     202  // of interest is only k_ind2, special routine for improvement ... TODO OLIVER
    228203  for (int i = 1; i <= leadRing->N; i++)
    229204  {
     
    282257    return tmp2;
    283258  }
    284   long alpha_k = twoPow(leadRing->ch - k_ind2);
     259/*  long alpha_k = twoPow(leadRing->ch - k_ind2);
    285260  if (1 == 0 && alpha_k <= a) {  // Temporarly disabled, reducing coefficients not compatible with std TODO Oliver
    286261    zeroPoly = p_ISet((a / alpha_k)*alpha_k, tailRing);
     
    308283    pNext(tmp2) = zeroPoly;
    309284    return tmp2;
    310   }
     285  } */
    311286  return NULL;
    312287}
     
    343318  loop
    344319  {
    345     zeroPoly = NULL; //kFindDivisibleByZeroPoly(h);
     320#ifdef HAVE_VANGB
     321    zeroPoly = kFindDivisibleByZeroPoly(h);
    346322    if (zeroPoly != NULL)
    347323    {
     
    366342    }
    367343    else
     344#endif
    368345    {
    369346      j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
     
    994971      enterT(strat->P, strat);
    995972#ifdef HAVE_RING2TOM
     973#ifdef HAVE_VANGB
     974      int at_R = strat->tl;
     975#endif
    996976      if (currRing->cring == 1)
    997977        superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
     
    1000980        enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    1001981      // posInS only depends on the leading term
     982#ifdef HAVE_VANGB
     983      strat->enterS(strat->P, pos, strat, at_R);
     984#else
    1002985      strat->enterS(strat->P, pos, strat, strat->tl);
     986#endif
    1003987      if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
    1004988//      Print("[%d]",hilbeledeg);
Note: See TracChangeset for help on using the changeset viewer.