Changeset 9d0c2b in git for kernel/summator.h
- 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.h
r9d249b r9d0c2b 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: summator.h,v 1. 1 2008-07-04 14:19:38 motsakExp $ */6 /* $Id: summator.h,v 1.2 2008-07-08 08:18:27 Singular Exp $ */ 7 7 8 8 // #include <summator.h> // for CPolynomialSummator class … … 15 15 // CPolynomialSummator: unifies bucket and polynomial summation as the 16 16 // later is brocken in buckets :( 17 17 #ifdef HAVE_PLURAL 18 18 class CPolynomialSummator 19 19 { … … 21 21 ring m_basering; 22 22 bool m_bUsePolynomial; 23 union { 23 union 24 { 24 25 sBucket_pt m_bucket; 25 26 poly m_poly; 26 } m_temp; 27 } m_temp; 27 28 public: 28 29 CPolynomialSummator(ring rBaseRing, bool bUsePolynomial = false); … … 33 34 void AddAndDelete(poly pSummand, int iLength); 34 35 void AddAndDelete(poly pSummand); 35 36 36 37 inline void operator +=(poly pSummand){ AddAndDelete(pSummand); } 37 38 … … 40 41 void Add(poly pSummand, int iLength); 41 42 void Add(poly pSummand); 42 43 43 44 // get the final result and clear (set to zero) the summator 44 45 poly AddUpAndClear(); … … 46 47 47 48 inline operator poly() { return AddUpAndClear(); } 48 49 49 50 private: // no copies of this object at the moment!!! 50 51 CPolynomialSummator(const CPolynomialSummator& m); // Copy constructor 51 CPolynomialSummator& operator= (const CPolynomialSummator& m); // Assignment operator 52 CPolynomialSummator& operator= (const CPolynomialSummator& m); // Assignment operator 52 53 }; 53 54 55 #endif 54 56 #endif // ifndef SUMMATOR_H 55 57 56 57 58 59 60
Note: See TracChangeset
for help on using the changeset viewer.