Ignore:
Timestamp:
Nov 28, 2000, 12:50:56 PM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
718add5b6d1cfeccd8e65b50d42db0fd515f126a
Parents:
5e16f9ae5b8928fda665888d965340387f46c85c
Message:
* towards tailRings for local case


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

Legend:

Unmodified
Added
Removed
  • Singular/pp_Mult_mm_Noether__Template.cc

    r5e16f9a ra29995  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pp_Mult_mm_Noether__Template.cc,v 1.1 2000-11-25 11:59:57 Singular Exp $
     9 *  Version: $Id: pp_Mult_mm_Noether__Template.cc,v 1.2 2000-11-28 11:50:56 obachman Exp $
    1010 *******************************************************************/
    1111
    1212/***************************************************************
    1313 *
    14  *   Returns:  p*m
     14 *   Returns:  p*m, ll
     15 *   ll == pLength(p*m) , if on input ll < 0
     16 *   pLength(p) - pLength(p*m), if on input ll >= 0
    1517 *   Const:    p, m
    16  *   monoms which are smaller than spNoether are cut
    1718 *
    1819 ***************************************************************/
    19 poly pp_Mult_mm_Noether(poly p, const poly m, const poly spNoether, int &ll, const ring ri, poly &last)
     20poly pp_Mult_mm_Noether(poly p, const poly m, const poly spNoether, int &ll,
     21                        const ring ri, poly &last)
    2022{
    2123  p_Test(p, ri);
    2224  p_LmTest(m, ri);
     25  assume(spNoether != NULL);
    2326  if (p == NULL)
    2427  {
     28    ll = 0;
    2529    last = NULL;
    26     ll = 0;
    2730    return NULL;
    2831  }
    2932  spolyrec rp;
    3033  poly q = &rp, r;
     34  const unsigned long *spNoether_exp = spNoether->exp;
    3135  number ln = pGetCoeff(m);
    3236  omBin bin = ri->PolyBin;
    33   assume(spNoether != NULL);
    34   unsigned long *spNoether_exp = spNoether->exp;
    3537  DECLARE_LENGTH(const unsigned long length = ri->ExpL_Size);
    3638  DECLARE_ORDSGN(const long* ordsgn = ri->ordsgn);
     
    4042  int l = 0;
    4143 
    42   while (p != NULL)
     44  do
    4345  {
    44     p_AllocBin( r, bin, ri);
     46    p_AllocBin(r, bin, ri);
    4547    p_MemSum(r->exp, p->exp, m_e, length);
    4648    p_MemAddAdjust(r, ri);
    47     p_MemCmp(r->exp, spNoether->exp, length, ordsgn, goto Continue, goto Continue, goto Break);
     49
     50    p_MemCmp(r->exp, spNoether_exp, length, ordsgn, goto Continue, goto Continue, goto Break);
    4851   
    4952    Break:
    5053    p_FreeBinAddr(r, ri);
    5154    break;
    52    
     55
    5356    Continue:
     57    l++;
    5458    q = pNext(q) = r;
    5559    pSetCoeff0(q, n_Mult(ln, pGetCoeff(p), ri));
    56     l++;
    5760    pIter(p);
    58   }
    59   if (q  != &rp) last = q;
     61  } while (p != NULL);
     62
     63  if (ll < 0)
     64    ll = l;
     65  else
     66    ll = pLength(p);
     67 
     68  if (q != &rp)
     69    last = q;
    6070  pNext(q) = NULL;
    61   ll = l;
    6271
    6372  p_Test(pNext(&rp), ri);
Note: See TracChangeset for help on using the changeset viewer.