|
OpenMD 3.1
Molecular Dynamics in the Open
|
A generic Polynomial class. More...
#include "math/Polynomial.hpp"
Public Types | |
| using | PolynomialType = Polynomial<Real> |
| using | ExponentType = int |
| using | CoefficientType = Real |
| using | PolynomialPairMap = std::map<ExponentType, CoefficientType> |
| using | iterator = typename PolynomialPairMap::iterator |
| using | const_iterator = typename PolynomialPairMap::const_iterator |
Public Member Functions | |
| Polynomial (Real v) | |
| Real | evaluate (const Real &x) |
| Calculates the value of this Polynomial evaluated at the given x value. | |
| Real | evaluateDerivative (const Real &x) |
| Returns the first derivative of this polynomial. | |
| void | setCoefficient (int exponent, const Real &coefficient) |
| Set the coefficent of the specified exponent, if the coefficient is already there, it will be overwritten. | |
| void | addCoefficient (int exponent, const Real &coefficient) |
| Set the coefficent of the specified exponent. | |
| Real | getCoefficient (ExponentType exponent) |
| Returns the coefficient associated with the given power for this Polynomial. | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| iterator | find (ExponentType exponent) |
| size_t | size () |
| int | degree () |
| PolynomialType & | operator+= (const PolynomialType &p) |
| PolynomialType & | operator-= (const PolynomialType &p) |
| PolynomialType & | operator*= (const PolynomialType &p) |
| PolynomialType & | operator*= (const Real v) |
| PolynomialType & | operator+= (const Real v) |
| PolynomialType * | getDerivative () |
| Returns the first derivative of this polynomial. | |
| DynamicRectMatrix< Real > | CreateCompanion () |
| std::vector< complex< Real > > | FindRoots () |
| std::vector< Real > | FindRealRoots () |
A generic Polynomial class.
Definition at line 83 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::CoefficientType = Real |
Definition at line 87 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::const_iterator = typename PolynomialPairMap::const_iterator |
Definition at line 90 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::ExponentType = int |
Definition at line 86 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::iterator = typename PolynomialPairMap::iterator |
Definition at line 89 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::PolynomialPairMap = std::map<ExponentType, CoefficientType> |
Definition at line 88 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::PolynomialType = Polynomial<Real> |
Definition at line 85 of file Polynomial.hpp.
|
inline |
Definition at line 92 of file Polynomial.hpp.
|
inline |
Definition at line 93 of file Polynomial.hpp.
|
inline |
Set the coefficent of the specified exponent.
If the coefficient is already there, just add the new coefficient to the old one, otherwise, just call setCoefficent
| exponent | exponent of a term in this Polynomial |
| coefficient | multiplier of a term in this Polynomial |
Definition at line 151 of file Polynomial.hpp.
References OpenMD::Polynomial< Real >::setCoefficient().
Referenced by OpenMD::operator*(), OpenMD::operator+(), and OpenMD::operator-().
|
inline |
Definition at line 178 of file Polynomial.hpp.
|
inline |
Definition at line 179 of file Polynomial.hpp.
|
inline |
Definition at line 265 of file Polynomial.hpp.
|
inline |
Definition at line 188 of file Polynomial.hpp.
|
inline |
Definition at line 181 of file Polynomial.hpp.
|
inline |
Definition at line 182 of file Polynomial.hpp.
|
inline |
Calculates the value of this Polynomial evaluated at the given x value.
| x | the value of the independent variable for this Polynomial function |
Definition at line 101 of file Polynomial.hpp.
|
inline |
Returns the first derivative of this polynomial.
| x |
Definition at line 120 of file Polynomial.hpp.
|
inline |
Definition at line 184 of file Polynomial.hpp.
|
inline |
Definition at line 298 of file Polynomial.hpp.
|
inline |
Definition at line 282 of file Polynomial.hpp.
|
inline |
Returns the coefficient associated with the given power for this Polynomial.
| exponent | exponent of any term in this Polynomial |
Definition at line 168 of file Polynomial.hpp.
|
inline |
Returns the first derivative of this polynomial.
Definition at line 248 of file Polynomial.hpp.
References OpenMD::Polynomial< Real >::setCoefficient().
|
inline |
Definition at line 214 of file Polynomial.hpp.
|
inline |
Definition at line 228 of file Polynomial.hpp.
|
inline |
Definition at line 196 of file Polynomial.hpp.
|
inline |
Definition at line 239 of file Polynomial.hpp.
|
inline |
Definition at line 206 of file Polynomial.hpp.
|
inline |
Set the coefficent of the specified exponent, if the coefficient is already there, it will be overwritten.
| exponent | exponent of a term in this Polynomial |
| coefficient | multiplier of a term in this Polynomial |
Definition at line 140 of file Polynomial.hpp.
Referenced by OpenMD::Polynomial< Real >::addCoefficient(), OpenMD::getDerivative(), and OpenMD::Polynomial< Real >::getDerivative().
|
inline |
Definition at line 186 of file Polynomial.hpp.