vec_math
Class AssociatedLegendrePolynomial

java.lang.Object
  extended by vec_math.AssociatedLegendrePolynomial

public class AssociatedLegendrePolynomial
extends Object

This class implements associated legandre polynomials (P^m_l). The calculation follows Numerical Recipes p 254.


Nested Class Summary
static class AssociatedLegendrePolynomial.Test
          Test class, reads m and l and steps through x from -1 to +1.
 
Constructor Summary
AssociatedLegendrePolynomial()
           
 
Method Summary
 double norm(int l, int m)
          Returns the normalization factor for asociated legendre polynomials for fixed m:
 double norm(int l, int m, double xlow, double xhigh)
          Returns the normalization factor for asociated legendre polynomials for fixed m, orthogonal on a zonal part only.
static double pml(int l, int m, double x)
          Calculates P^m_l(x) for 0<=m<=l and |x|<=1.
static double zonal(double x, double xlow, double xhigh)
          Associated Legendre polynomials might be renormated to be orthogonal on any strip in -1...+1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociatedLegendrePolynomial

public AssociatedLegendrePolynomial()
Method Detail

pml

public static double pml(int l,
                         int m,
                         double x)
Calculates P^m_l(x) for 0<=m<=l and |x|<=1. To get P^-m_l, use the relation
 P-ml=(-1)m(l-m)!/(l+m)! Pml
 

Parameters:
l - 0<=l, degree of polynomial
m - 0<=m<=l, order of polynomial
x - -1<=x<=1 argument

zonal

public static double zonal(double x,
                           double xlow,
                           double xhigh)
Associated Legendre polynomials might be renormated to be orthogonal on any strip in -1...+1. This is important if one wants to construct harmonics that are orthogonal not on the entire sphere, but only on a spherical zone.

Parameters:
x - The argument
xlow - The lower boundary of the segment.
xhigh - The upper boundary of the spherical segment.

norm

public double norm(int l,
                   int m)
Returns the normalization factor for asociated legendre polynomials for fixed m:
1-1PmlPmk/sub>dx=2(l+m)!/(2l+1)/(l-m)! δk,l
 


norm

public double norm(int l,
                   int m,
                   double xlow,
                   double xhigh)
Returns the normalization factor for asociated legendre polynomials for fixed m, orthogonal on a zonal part only.

Parameters:
xlow - The lower boundary of the segment.
xhigh - The upper boundary of the spherical segment.