org.opensourcephysics.numerics.specialfunctions
Class Legendre

java.lang.Object
  extended by org.opensourcephysics.numerics.specialfunctions.Legendre

public class Legendre
extends java.lang.Object

Computes Laguerre polynomials and associated Laguerre polynomials.

Version:
1.0
Author:
W. Christian

Method Summary
static double evaluate(int el, double x)
          Evaluates the el-th Legendre polynomial at x.
static Function getAssociatedFunction(int el, int m)
          Gets the associated Legendre function.
static Polynomial getPolynomial(int el)
          Gets the el-th Legendre polynomial.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPolynomial

public static Polynomial getPolynomial(int el)
Gets the el-th Legendre polynomial. If the polynomial has already been calculated it is returned from the list. Uses the recurrence relationship to construct new polynomials based on lower order polynomials.


getAssociatedFunction

public static Function getAssociatedFunction(int el,
                                             int m)
Gets the associated Legendre function. If the function has already been calculated it is returned from the map. Uses the Legendre polynomial recurrence relationship to construct new functions based on derivatives of lower order polynomials.


evaluate

public static double evaluate(int el,
                              double x)
Evaluates the el-th Legendre polynomial at x.

Returns:
the value of the function