Changeset cea6f3 in git for kernel/p_Mult_q.cc


Ignore:
Timestamp:
Jan 13, 2006, 7:10:06 PM (18 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2e4de3d33d0bea3780e1932fdaf8a41c161f473e
Parents:
4cbb61ba5014a593b9bc6569b497e9a8151bc15f
Message:
RING2TOM Merger


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

Legend:

Unmodified
Added
Removed
  • kernel/p_Mult_q.cc

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Mult_q.cc,v 1.1.1.1 2003-10-06 12:16:00 Singular Exp $
     9 *  Version: $Id: p_Mult_q.cc,v 1.2 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    165165
    166166  poly res = pp_Mult_mm(p,q,r);     // holds initially q1*p
     167#ifdef HAVE_RING2TOM
     168  if (res == NULL) {
     169    res = p_ISet(1, r);
     170    p_SetCoeff(res, (number) 0, r);
     171  }
     172#endif
    167173  poly qq = pNext(q);               // we iter of this
    168174  poly qn = pp_Mult_mm(qq, p,r);    // holds p1*qi
     
    174180  // now the main loop
    175181  Top:
     182#ifdef HAVE_RING2TOM
     183  if (qn == NULL && rn == NULL) goto Work;
     184  if (qn == NULL) goto Greater;
     185#endif
    176186  if (rn == NULL) goto Smaller;
    177187  p_LmCmpAction(rn, qn, r, goto Equal, goto Greater, goto Smaller);
     
    188198  rr = qn;
    189199  pIter(qn);
     200
    190201  Work: // compute res + Lm(qq)*pp
    191202  if (rn == NULL)
     
    226237    p_Delete(&q, r);
    227238  }
     239#ifdef HAVE_RING2TOM
     240  if (n_IsZero(p_GetCoeff(res, r), r)) {
     241    res = p_LmDeleteAndNext(res, r);
     242  }
     243#endif
    228244  p_Test(res, r);
    229245  return res;
Note: See TracChangeset for help on using the changeset viewer.