| 47 | 
  | 
 * @version 1.0 | 
| 48 | 
  | 
 */  | 
| 49 | 
  | 
 | 
| 50 | 
< | 
#ifndef MATH_CHEBYSHEVPOLYNOMIALS_HPP | 
| 51 | 
< | 
#define MATH_CHEBYSHEVPOLYNOMIALS_HPP | 
| 50 | 
> | 
#ifndef MATH_LEGENDREPOLYNOMIALS_HPP | 
| 51 | 
> | 
#define MATH_LEGENDREPOLYNOMIALS_HPP | 
| 52 | 
  | 
 | 
| 53 | 
  | 
#include <vector> | 
| 54 | 
  | 
#include <cassert> | 
| 59 | 
  | 
 | 
| 60 | 
  | 
  /** | 
| 61 | 
  | 
   * @class LegendrePolynomial | 
| 62 | 
< | 
   * A collection of Chebyshev Polynomials. | 
| 62 | 
> | 
   * A collection of Legendre Polynomials. | 
| 63 | 
  | 
   * @todo document | 
| 64 | 
  | 
   */ | 
| 65 | 
  | 
  class LegendrePolynomial { | 
| 67 | 
  | 
    LegendrePolynomial(int maxPower); | 
| 68 | 
  | 
    virtual ~LegendrePolynomial() {} | 
| 69 | 
  | 
    /** | 
| 70 | 
< | 
     * Calculates the value of the nth Chebyshev Polynomial evaluated at the given x value. | 
| 71 | 
< | 
     * @return The value of the nth Chebyshev Polynomial evaluates at the given x value | 
| 70 | 
> | 
     * Calculates the value of the nth Legendre Polynomial evaluated at the given x value. | 
| 71 | 
> | 
     * @return The value of the nth Legendre Polynomial evaluates at the given x value | 
| 72 | 
  | 
     * @param n | 
| 73 | 
< | 
     * @param x the value of the independent variable for the nth Chebyshev Polynomial  function | 
| 73 | 
> | 
     * @param x the value of the independent variable for the nth Legendre Polynomial  function | 
| 74 | 
  | 
     */ | 
| 75 | 
  | 
         | 
| 76 | 
  | 
    RealType evaluate(int n, RealType x) { | 
| 79 | 
  | 
    } | 
| 80 | 
  | 
 | 
| 81 | 
  | 
    /** | 
| 82 | 
< | 
     * Returns the first derivative of the nth Chebyshev Polynomial. | 
| 83 | 
< | 
     * @return the first derivative of the nth Chebyshev Polynomial | 
| 82 | 
> | 
     * Returns the first derivative of the nth Legendre Polynomial. | 
| 83 | 
> | 
     * @return the first derivative of the nth Legendre Polynomial | 
| 84 | 
  | 
     * @param n | 
| 85 | 
< | 
     * @param x the value of the independent variable for the nth Chebyshev Polynomial  function | 
| 85 | 
> | 
     * @param x the value of the independent variable for the nth Legendre Polynomial  function | 
| 86 | 
  | 
     */ | 
| 87 | 
  | 
    RealType evaluateDerivative(int n, RealType x) { | 
| 88 | 
  | 
      assert (n <= maxPower_ && n >=0);  | 
| 90 | 
  | 
    } | 
| 91 | 
  | 
 | 
| 92 | 
  | 
    /** | 
| 93 | 
< | 
     * Returns the nth Chebyshev Polynomial  | 
| 94 | 
< | 
     * @return the nth Chebyshev Polynomial | 
| 93 | 
> | 
     * Returns the nth Legendre Polynomial  | 
| 94 | 
> | 
     * @return the nth Legendre Polynomial | 
| 95 | 
  | 
     * @param n | 
| 96 | 
  | 
     */ | 
| 97 | 
  | 
    const DoublePolynomial& getLegendrePolynomial(int n) const { | 
| 112 | 
  | 
  };     | 
| 113 | 
  | 
 | 
| 114 | 
  | 
 | 
| 115 | 
< | 
} //end namespace OpenMD | 
| 116 | 
< | 
#endif //MATH_CHEBYSHEVPOLYNOMIALS_HPP | 
| 115 | 
> | 
}  | 
| 116 | 
> | 
#endif  | 
| 117 | 
  | 
 |