CSERD


  • userhome
  • catalog
  • resources
  • help

Associated Legendre class


Shodor > CSERD > Resources > Libraries > Associated Legendre class

  Download Source Code  •  Documentation  •  View License Agreement


AssocLegendre class documentation

AssocLegendre is used to evaluate the associated legendre function Plm(x), using recursion relations from Appendix B, Volume 1, Messiah's Quantum Mechanics.

At some point I plan to make some modifications to speed up evaluation when multiple function calls are made with regularly changing values of l.

The Java version uses the doubleFactorial method from the MathLib class. For the C++ code, factorial routines are included.

Languages:

  • C++
  • Java

    C++

    Member variables

    
      private:
        int l;
        int m;
    

    Methods

  • Constructor: AssocLegendre::AssocLegendre(int l, int m);
  • Constructor: AssocLegendre::AssocLegendre();
  • Destructor: AssocLegendre::~AssocLegendre();
  • void AssocLegendre::setL(int l);
  • void AssocLegendre::setM(int l);
  • void AssocLegendre::setLM(int l, int M);
  • int AssocLegendre::getL();
  • int AssocLegendre::getM();
  • double AssocLegendre::eval(double u);

    Java

    Member variables

    
        private int l;
        private int m;
    

    Methods

  • Constructor: public AssocLegendre(int l, int m)
  • Constructor: public AssocLegendre()
  • public void setL(int l)
  • public void setM(int l)
  • public void setLM(int l, int m)
  • public int getL()
  • public int getM()
  • public double eval(double u)

  • ©1994-2024 Shodor