ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/math/Polynomial.hpp
(Generate patch)

Comparing trunk/src/math/Polynomial.hpp (file contents):
Revision 1782 by gezelter, Wed Aug 22 02:28:28 2012 UTC vs.
Revision 1793 by gezelter, Fri Aug 31 21:16:10 2012 UTC

# Line 338 | Line 338 | namespace OpenMD {
338          roots.push_back( -fC0 / fC1);
339          return roots;
340        }
341        break;      
341        case 2: {
342          Real fC2 = getCoefficient(2);
343          Real fC1 = getCoefficient(1);
# Line 362 | Line 361 | namespace OpenMD {
361            roots.push_back(-fTmp * fC1);  // 1 real root
362          }
363        }
364 <        return roots;
366 <        break;
367 <      
364 >        return roots;        
365        case 3: {
366          Real fC3 = getCoefficient(3);
367          Real fC2 = getCoefficient(2);
# Line 431 | Line 428 | namespace OpenMD {
428          }
429        }
430          return roots;
431 <        break;
431 >
432        case 4: {
433          Real fC4 = getCoefficient(4);
434          Real fC3 = getCoefficient(3);
# Line 517 | Line 514 | namespace OpenMD {
514          }
515        }
516          return roots;
517 <        break;
517 >
518        default: {
519          DynamicRectMatrix<Real> companion = CreateCompanion();
520          JAMA::Eigenvalue<Real> eig(companion);
# Line 531 | Line 528 | namespace OpenMD {
528          }      
529        }
530          return roots;
531 <        break;
532 <      }
536 <
537 <      return roots; // should be empty if you got here
531 >        
532 >      }    
533      }
534 <  
534 >    
535    private:
536          
537      PolynomialPairMap polyPairMap_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines