36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
/** |
274 |
|
* @return the first derivative of this polynomial |
275 |
|
*/ |
276 |
|
PolynomialType & getDerivative() { |
277 |
< |
Polynomial<Real> p(); |
277 |
> |
Polynomial<Real> p; |
278 |
|
|
279 |
|
typename Polynomial<Real>::const_iterator i; |
280 |
|
ExponentType exponent; |
338 |
|
roots.push_back( -fC0 / fC1); |
339 |
|
return roots; |
340 |
|
} |
340 |
– |
break; |
341 |
|
case 2: { |
342 |
|
Real fC2 = getCoefficient(2); |
343 |
|
Real fC1 = getCoefficient(1); |
361 |
|
roots.push_back(-fTmp * fC1); // 1 real root |
362 |
|
} |
363 |
|
} |
364 |
< |
return roots; |
365 |
< |
break; |
366 |
< |
|
364 |
> |
return roots; |
365 |
|
case 3: { |
366 |
|
Real fC3 = getCoefficient(3); |
367 |
|
Real fC2 = getCoefficient(2); |
428 |
|
} |
429 |
|
} |
430 |
|
return roots; |
431 |
< |
break; |
431 |
> |
|
432 |
|
case 4: { |
433 |
|
Real fC4 = getCoefficient(4); |
434 |
|
Real fC3 = getCoefficient(3); |
514 |
|
} |
515 |
|
} |
516 |
|
return roots; |
517 |
< |
break; |
517 |
> |
|
518 |
|
default: { |
519 |
|
DynamicRectMatrix<Real> companion = CreateCompanion(); |
520 |
|
JAMA::Eigenvalue<Real> eig(companion); |
528 |
|
} |
529 |
|
} |
530 |
|
return roots; |
531 |
< |
break; |
532 |
< |
} |
535 |
< |
|
536 |
< |
return roots; // should be empty if you got here |
531 |
> |
|
532 |
> |
} |
533 |
|
} |
534 |
< |
|
534 |
> |
|
535 |
|
private: |
536 |
|
|
537 |
|
PolynomialPairMap polyPairMap_; |
626 |
|
*/ |
627 |
|
template<typename Real> |
628 |
|
Polynomial<Real> getDerivative(const Polynomial<Real>& p1) { |
629 |
< |
Polynomial<Real> p(); |
629 |
> |
Polynomial<Real> p; |
630 |
|
|
631 |
|
typename Polynomial<Real>::const_iterator i; |
632 |
|
int exponent; |