Changeset 25061a in git for kernel/tgb_internal.h


Ignore:
Timestamp:
Oct 17, 2005, 7:12:50 PM (17 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
4e01d2939d69a59407ea07140f184ace5c292bef
Parents:
bc6c75e647eb65339809ff5f7fea57c7e0b139f4
Message:
*bricken: generalized wlen type initial work


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

Legend:

Unmodified
Added
Removed
  • kernel/tgb_internal.h

    rbc6c75e r25061a  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb_internal.h,v 1.16 2005-07-20 11:12:43 bricken Exp $ */
     7/* $Id: tgb_internal.h,v 1.17 2005-10-17 17:12:37 bricken Exp $ */
    88/*
    99 * ABSTRACT: tgb internal .h file
     
    153153    SOONTREP
    154154  };
    155 
     155template <class len_type, class set_type>  int pos_helper(kStrategy strat, poly p, len_type len, set_type setL, polyset set);
    156156static int add_to_reductors(slimgb_alg* c, poly h, int len);
    157157static int bucket_guess(kBucket* bucket);
     
    170170static void soon_t_rep(const int & arg_i, const int & arg_j, slimgb_alg* c);
    171171static int pLcmDeg(poly a, poly b);
    172 static int simple_posInS (kStrategy strat, poly p,int len);
     172static int simple_posInS (kStrategy strat, poly p,int len, wlen_type wlen);
    173173static BOOLEAN find_next_pair(slimgb_alg* c, BOOLEAN go_higher=TRUE);
    174174
     
    241241static void finalize_reduction_step(reduction_step* r);
    242242
     243template <class len_type, class set_type>  int pos_helper(kStrategy strat, poly p, len_type len, set_type setL, polyset set){
     244  int length=strat->sl;
     245  int i;
     246  int an = 0;
     247  int en= length;
     248
     249  if ((len>setL[length])
     250      || ((len==setL[length]) && (pLmCmp(set[length],p)== -1)))
     251    return length+1;
     252
     253  loop
     254  {
     255    if (an >= en-1)
     256    {
     257      if ((len<setL[an])
     258          || ((len==setL[an]) && (pLmCmp(set[an],p) == 1))) return an;
     259      return en;
     260    }
     261    i=(an+en) / 2;
     262    if ((len<setL[i])
     263        || ((len==setL[i]) && (pLmCmp(set[i],p) == 1))) en=i;
     264    //else if ((len>setL[i])
     265    //|| ((len==setL[i]) && (pLmCmp(set[i],p) == -1))) an=i;
     266    else an=i;
     267  }
     268
     269}
    243270
    244271
Note: See TracChangeset for help on using the changeset viewer.