Ignore:
Timestamp:
Oct 9, 2001, 6:36:27 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7497ef3773fc1afff892546445b1d82b1cf0fb05
Parents:
e58c4abd91b68d128331a23f3f9dd76dff924048
Message:
*hannes: namespaces ->ns


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

Legend:

Unmodified
Added
Removed
  • Singular/p_Minus_mm_Mult_qq__T.cc

    re58c4a ra3bc95e  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Minus_mm_Mult_qq__T.cc,v 1.2 2001-08-27 14:47:25 Singular Exp $
     9 *  Version: $Id: p_Minus_mm_Mult_qq__T.cc,v 1.3 2001-10-09 16:36:14 Singular Exp $
    1010 *******************************************************************/
    1111
     
    1616 * Destroys: p
    1717 * Const:    m, q
    18  * 
     18 *
    1919 ***************************************************************/
    2020LINKAGE poly p_Minus_mm_Mult_qq(poly p, poly m, poly q, int& Shorter, const poly spNoether, const ring r, poly &last)
     
    3131  // we are done if q == NULL || m == NULL
    3232  if (q == NULL || m == NULL) return p;
    33  
     33
    3434  spolyrec rp;
    3535  poly a = &rp,                    // collects the result
     
    5050  const unsigned long* m_e = m->exp;
    5151  omBin bin = r->PolyBin;
    52  
     52
    5353  if (p == NULL) goto Finish;           // return tneg*q if (p == NULL)
    54  
     54
    5555  pAssume(p_GetComp(q, r) == 0 || p_GetComp(m, r) == 0);
    5656
     
    6060  p_MemSum(qm->exp, q->exp, m_e, length);
    6161  p_MemAddAdjust(qm, r);
    62  
    63   CmpTop:     
     62
     63  CmpTop:
    6464  // compare qm = m*q and p w.r.t. monomial ordering
    6565  p_MemCmp(qm->exp, p->exp, length, ordsgn, goto Equal, goto Greater, goto Smaller );
    66  
     66
    6767  Equal:   // qm equals p
    6868  tb = n_Mult(pGetCoeff(q), tm, r);
     
    7878  }
    7979  else
    80   { // coeffs are equal, so their difference is 0: 
     80  { // coeffs are equal, so their difference is 0:
    8181    shorter += 2;
    8282    n_Delete(&tc, r);
     
    8888  // no, so update qm
    8989  goto SumTop;
    90  
     90
    9191
    9292  Greater:
     
    9797  {
    9898    qm = NULL;
    99     goto Finish; 
     99    goto Finish;
    100100  }
    101   // construct new qm 
     101  // construct new qm
    102102  goto AllocTop;
    103    
    104   Smaller:     
     103
     104  Smaller:
    105105  a = pNext(a) = p;// append p to result and advance p
    106106  pIter(p);
    107107  if (p == NULL) goto Finish;
    108108  goto CmpTop;
    109  
     109
    110110
    111111  Finish: // q or p is NULL: Clean-up time
     
    129129    pSetCoeff0(m, tm);
    130130  }
    131    
     131
    132132  n_Delete(&tneg, r);
    133133  if (qm != NULL) p_FreeBinAddr(qm, r);
     
    135135  p_Test(pNext(&rp), r);
    136136  return pNext(&rp);
    137 } 
     137}
Note: See TracChangeset for help on using the changeset viewer.