|
OpenMD 3.2
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< std::complex< Real > > | FindRoots () |
| std::vector< Real > | FindRealRoots () |
A generic Polynomial class.
Definition at line 86 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::CoefficientType = Real |
Definition at line 90 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::const_iterator = typename PolynomialPairMap::const_iterator |
Definition at line 93 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::ExponentType = int |
Definition at line 89 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::iterator = typename PolynomialPairMap::iterator |
Definition at line 92 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::PolynomialPairMap = std::map<ExponentType, CoefficientType> |
Definition at line 91 of file Polynomial.hpp.
| using OpenMD::Polynomial< Real >::PolynomialType = Polynomial<Real> |
Definition at line 88 of file Polynomial.hpp.
|
inline |
Definition at line 95 of file Polynomial.hpp.
|
inline |
Definition at line 96 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 154 of file Polynomial.hpp.
Referenced by OpenMD::operator*(), OpenMD::operator+(), and OpenMD::operator-().
|
inline |
Definition at line 181 of file Polynomial.hpp.
|
inline |
Definition at line 182 of file Polynomial.hpp.
|
inline |
Definition at line 268 of file Polynomial.hpp.
|
inline |
Definition at line 191 of file Polynomial.hpp.
|
inline |
Definition at line 184 of file Polynomial.hpp.
|
inline |
Definition at line 185 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 104 of file Polynomial.hpp.
|
inline |
Returns the first derivative of this polynomial.
| x |
Definition at line 123 of file Polynomial.hpp.
|
inline |
Definition at line 187 of file Polynomial.hpp.
|
inline |
Definition at line 301 of file Polynomial.hpp.
|
inline |
Definition at line 285 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 171 of file Polynomial.hpp.
|
inline |
Returns the first derivative of this polynomial.
Definition at line 251 of file Polynomial.hpp.
|
inline |
Definition at line 217 of file Polynomial.hpp.
|
inline |
Definition at line 231 of file Polynomial.hpp.
|
inline |
Definition at line 199 of file Polynomial.hpp.
|
inline |
Definition at line 242 of file Polynomial.hpp.
|
inline |
Definition at line 209 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 143 of file Polynomial.hpp.
Referenced by OpenMD::Polynomial< RealType >::addCoefficient(), OpenMD::getDerivative(), and OpenMD::Polynomial< RealType >::getDerivative().
|
inline |
Definition at line 189 of file Polynomial.hpp.