Changeset 49c9e43 in git for kernel/Poly.h
- Timestamp:
- Aug 16, 2005, 3:40:57 PM (19 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- ef1452cd49d0a519c81e3ffe1bdf3b719b6d72eb
- Parents:
- 5acfea3cd67353ca02441a08fb6b399646b631fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Poly.h
r5acfea3 r49c9e43 1 //$Id: Poly.h,v 1. 5 2005-08-16 12:20:23bricken Exp $1 //$Id: Poly.h,v 1.6 2005-08-16 13:40:57 bricken Exp $ 2 2 3 3 … … 169 169 this->r=r; 170 170 } 171 PolyImpl(const Number & n){ 172 173 r=n.r; 174 this->p=p_NSet(n_Copy(n.n,r),r); 175 176 } 171 177 explicit PolyImpl(int n){ 172 178 r=currRing; … … 347 353 omfree(cp); 348 354 } 355 Poly(const Poly&p):ptr(p.ptr){ 356 } 357 Poly(const Number& n):ptr(new PolyImpl(n)){ 358 359 } 349 360 Poly(std::vector<int> v, ring r=currRing):ptr(new PolyImpl((poly) NULL,r)){ 350 361 unsigned int i; … … 388 399 ptr=p.ptr; 389 400 }*/ 390 Poly(const Poly&p):ptr(p.ptr){ 391 } 401 392 402 PolyInputIterator<Poly> begin(){ 393 403 return PolyInputIterator<Poly>(ptr->p,ptr->r); … … 410 420 friend inline Poly operator+(const Poly& p1, const Poly& p2); 411 421 friend inline Poly operator*(const Poly& p1, const Poly& p2); 422 friend inline Poly operator*(const Poly& p1, const Number& n); 423 // friend inline Poly operator*(const Poly& p1, const Number& n); 412 424 413 425 }; … … 423 435 return(Poly(*res)); 424 436 } 425 437 inline Poly operator*(const Poly& p1, const Number& n){ 438 PolyImpl* res=new PolyImpl(*p1.ptr); 439 *res *= n; 440 return(Poly(*res)); 441 } 426 442 427 443
Note: See TracChangeset
for help on using the changeset viewer.