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 1792 by gezelter, Fri Aug 31 17:29:35 2012 UTC vs.
Revision 1793 by gezelter, Fri Aug 31 21:16:10 2012 UTC

# Line 337 | Line 337 | namespace OpenMD {
337          Real fC0 = getCoefficient(0);
338          roots.push_back( -fC0 / fC1);
339          return roots;
340        break;      
340        }
341        case 2: {
342          Real fC2 = getCoefficient(2);
# 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