Changeset 9d0c2b in git for kernel/summator.cc
- Timestamp:
- Jul 8, 2008, 10:18:27 AM (15 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 77987005e6c432b32a83558af620b8a21ecaa8cc
- Parents:
- 9d249b2bd6e53779def56a0139a8157d70ec75c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/summator.cc
r9d249b r9d0c2b 6 6 * Purpose: simple Summator usecase implementation 7 7 * Author: motsak 8 * Created: 9 * Version: $Id: summator.cc,v 1. 1 2008-07-04 14:19:38 motsakExp $8 * Created: 9 * Version: $Id: summator.cc,v 1.2 2008-07-08 08:18:27 Singular Exp $ 10 10 *******************************************************************/ 11 11 … … 20 20 21 21 #include "mod2.h" 22 22 #ifdef HAVE_PLURAL 23 23 #include <summator.h> // for CPolynomialSummator class 24 24 #include <ring.h> … … 41 41 m_temp.m_bucket = sBucketCreate(rBaseRing); 42 42 } 43 } ;43 } 44 44 45 45 /* … … 50 50 #ifdef PDEBUG 51 51 p_Test(pInitialSum, rBaseRing); 52 #endif 52 #endif 53 53 54 54 if(bUsePolynomial) … … 76 76 #ifdef PDEBUG 77 77 p_Test(m_temp.m_poly, m_basering); 78 #endif 79 78 #endif 80 79 p_Delete(&m_temp.m_poly, m_basering); 81 80 // m_temp.m_poly = NULL; … … 87 86 #ifdef PDEBUG 88 87 p_Test(pSummand, m_basering); 89 #endif 90 88 #endif 89 91 90 if(m_bUsePolynomial) 92 91 m_temp.m_poly = p_Add_q(m_temp.m_poly, pSummand, m_basering); … … 99 98 #ifdef PDEBUG 100 99 p_Test(pSummand, m_basering); 101 #endif 100 #endif 102 101 103 102 if(m_bUsePolynomial) … … 110 109 { 111 110 poly out = NULL; 112 111 113 112 if(m_bUsePolynomial) 114 113 { 115 114 out = m_temp.m_poly; 116 115 m_temp.m_poly = NULL; 117 } else 116 } 117 else 118 118 { 119 119 int pLength; … … 123 123 #ifdef PDEBUG 124 124 p_Test(out, m_basering); 125 #endif 126 125 #endif 126 127 127 return out; 128 128 } … … 132 132 { 133 133 poly out = NULL; 134 134 135 135 if(m_bUsePolynomial) 136 136 { … … 138 138 m_temp.m_poly = NULL; 139 139 *piLength = pLength(out); 140 } else 140 } 141 else 141 142 { 142 143 *piLength = 0; … … 147 148 p_Test(out, m_basering); 148 149 assume(pLength(out) == *piLength); 149 #endif 150 150 #endif 151 151 152 return out; 152 153 } … … 157 158 { 158 159 AddAndDelete(p_Copy(pSummand, m_basering), iLength); 159 } ;160 } 160 161 161 162 void CPolynomialSummator::Add(poly pSummand) 162 163 { 163 164 AddAndDelete(p_Copy(pSummand, m_basering)); 164 } ;165 } 165 166 166 167 #endif
Note: See TracChangeset
for help on using the changeset viewer.