Changeset 1a4c80b in git
- Timestamp:
- Jul 11, 2014, 12:30:51 PM (9 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 4e2cc188f9d61d04296ddb7df63d0eaccd719584
- Parents:
- 3169ca78b60cbcbd96901fbd89cf164a5ed0b62d
- git-author:
- Martin Lee <martinlee84@web.de>2014-07-11 12:30:51+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2014-07-17 12:07:11+02:00
- Location:
- factory
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/canonicalform.h
r3169ca r1a4c80b 271 271 272 272 bool hasFirstAlgVar( const CanonicalForm & f, Variable & a); 273 274 CanonicalForm leftShift (const CanonicalForm& F, int n); 273 275 //}}} 274 276 -
factory/cf_cyclo.cc
r3169ca r1a4c80b 131 131 for (int i= 0; i < distinct_factors_length; i++) 132 132 { 133 result= result (power (x, distinct_factors[i]), x)/result;133 result= leftShift (result, distinct_factors[i])/result; 134 134 prod *= distinct_factors[i]; 135 135 } 136 return result (power (x, n/prod), x);136 return leftShift (result, n/prod); 137 137 } 138 138 -
factory/cf_ops.cc
r3169ca r1a4c80b 677 677 return false; 678 678 } 679 680 /** left shift the main variable of F by n 681 * @return if x is the main variable of F the result is F(x^n) 682 **/ 683 CanonicalForm leftShift (const CanonicalForm& F, int n) 684 { 685 ASSERT (n >= 0, "cannot left shift by negative number"); 686 if (F.inBaseDomain()) 687 return F; 688 if (n == 0) 689 return F; 690 Variable x=F.mvar(); 691 CanonicalForm result= 0; 692 for (CFIterator i= F; i.hasTerms(); i++) 693 result += i.coeff()*power (x, i.exp()*n); 694 return result; 695 }
Note: See TracChangeset
for help on using the changeset viewer.