Changeset a6889e in git


Ignore:
Timestamp:
Jan 16, 2006, 4:27:10 AM (18 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', '2fa36c576e6a4ddbb1093b43c7f8e9835e17e52a')
Children:
2be0b378a350d61f44d0245309b730d0dc823681
Parents:
c6022d8f25317f2f6b7390478a1df53933e9e351
Message:
Funktionen erreichbar über extra.cc


git-svn-id: file:///usr/local/Singular/svn/trunk@8903 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    rc6022d ra6889e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.5 2006-01-13 18:10:04 wienand Exp $ */
     4/* $Id: kstd2.cc,v 1.6 2006-01-16 03:27:10 wienand Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    172172}
    173173
    174 poly kFindDivisibleByZeroPoly(LObject* h) {
     174poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing) {
    175175  // m = currRing->ch
     176
     177  if (input_p == NULL) return NULL;
    176178
    177179  int k_ind2 = 0;
    178180  int a_ind2 = 0;
    179181
    180   poly p = h->GetLmCurrRing();
     182  poly p = input_p;
    181183  poly zeroPoly = NULL;
    182184  long a = (long) pGetCoeff(p);
     
    188190  }
    189191
    190   for (int i = 1; i <= currRing->N; i++) {
     192  for (int i = 1; i <= leadRing->N; i++) {
    191193    a = factorial(pGetExp(p, i));
    192194    k = k * a;
     
    200202  number tmp1;
    201203  poly tmp2, tmp3;
    202   if (currRing->ch <= k_ind2 + a_ind2) {
    203     zeroPoly = p_ISet(a, h->tailRing);
    204     for (int i = 1; i <= currRing->N; i++) {
     204  if (leadRing->ch <= k_ind2 + a_ind2) {
     205    zeroPoly = p_ISet(a, tailRing);
     206    for (int i = 1; i <= leadRing->N; i++) {
    205207      for (long j = 1; j <= pGetExp(p, i); j++) {
    206208        tmp1 = nInit(j);
    207         tmp2 = p_ISet(1, h->tailRing);
    208         p_SetExp(tmp2, i, 1, h->tailRing);
    209         p_Setm(tmp2, h->tailRing);
     209        tmp2 = p_ISet(1, tailRing);
     210        p_SetExp(tmp2, i, 1, tailRing);
     211        p_Setm(tmp2, tailRing);
    210212        if (nIsZero(tmp1)) {
    211           zeroPoly = p_Mult_q(zeroPoly, tmp2, h->tailRing);
     213          zeroPoly = p_Mult_q(zeroPoly, tmp2, tailRing);
    212214        }
    213215        else {
    214           tmp3 = p_ISet((long) tmp1, h->tailRing);
    215           zeroPoly = p_Mult_q(zeroPoly, p_Add_q(tmp2, tmp3, h->tailRing), h->tailRing);
     216          tmp3 = p_ISet((long) tmp1, tailRing);
     217          zeroPoly = p_Mult_q(zeroPoly, p_Add_q(tmp2, tmp3, tailRing), tailRing);
    216218        }
    217219      }
    218220    }
    219     zeroPoly = p_LmDeleteAndNext(zeroPoly, h->tailRing);
     221    zeroPoly = p_LmDeleteAndNext(zeroPoly, tailRing);
    220222    tmp2 = pISet(a);
    221     for (int i = 1; i <= currRing->N; i++) {
     223    for (int i = 1; i <= leadRing->N; i++) {
    222224      pSetExp(tmp2, i, pGetExp(p, i));
    223225    }
     
    226228    return tmp2;
    227229  }
    228   if (currRing->ch - k_ind2 <= a_ind2) {
     230  if (leadRing->ch - k_ind2 <= a_ind2) {
    229231    PrintS("Case not implented yet !!!"); PrintLn();
    230232    PrintS("But it should not mae any difference."); PrintLn();
     
    232234  }
    233235  return NULL;
     236}
     237
     238poly kFindDivisibleByZeroPoly(LObject* h) {
     239  return kFindZeroPoly(h->GetLmCurrRing(), currRing, h->tailRing);
    234240}
    235241
     
    241247  if (h->p == NULL && h->t_p == NULL) return 0; // spoly is zero (can only occure with zero divisors)
    242248
    243   if (strat->tl<0) return 1;
     249//  if (strat->tl<0) return 1;
    244250  int at,d,i;
    245251  int j = 0;
     
    262268  loop
    263269  {
    264     zeroPoly = NULL; //kFindDivisibleByZeroPoly(h);
     270    zeroPoly = kFindDivisibleByZeroPoly(h);
    265271    if (zeroPoly != NULL) {
    266272#ifdef KDEBUG
    267273      if (TEST_OPT_DEBUG)
    268274      {
     275        PrintS("zero poly created: ");
     276        wrp(zeroPoly);
     277        PrintLn();
    269278        PrintS("zero red:");
    270279      }
  • kernel/kutil.h

    rc6022d ra6889e  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.9 2006-01-13 18:10:05 wienand Exp $ */
     6/* $Id: kutil.h,v 1.10 2006-01-16 03:27:10 wienand Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    504504 *
    505505 ***************************************************************/
     506poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing);
    506507ideal bba (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat);
    507508poly kNF2 (ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce);
  • kernel/ringgb.cc

    rc6022d ra6889e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ringgb.cc,v 1.3 2006-01-13 18:10:05 wienand Exp $ */
     4/* $Id: ringgb.cc,v 1.4 2006-01-16 03:27:10 wienand Exp $ */
    55/*
    66* ABSTRACT: ringgb interface
     
    3030
    3131poly reduce_poly_fct(poly p, ring r) {
    32    return NULL;
     32   return kFindZeroPoly(p, r, r);
    3333}
    3434
  • kernel/rmodulo2m.cc

    rc6022d ra6889e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: rmodulo2m.cc,v 1.2 2006-01-13 18:10:06 wienand Exp $ */
     4/* $Id: rmodulo2m.cc,v 1.3 2006-01-16 03:27:10 wienand Exp $ */
    55/*
    66* ABSTRACT: numbers modulo 2^m
     
    244244    nr2mModul=0;
    245245  }
    246   PrintS("Modul: ");
    247   Print("%d\n", nr2mModul);
     246//  PrintS("Modul: ");
     247//  Print("%d\n", nr2mModul);
    248248}
    249249
Note: See TracChangeset for help on using the changeset viewer.