Open PaperOpt
OpenPaperOpt/DistributionHenyeyGreenstein.h
Go to the documentation of this file.
00001 
00005 #ifndef DISTRIBUTIONHENYEYGREENSTEIN_H
00006 #define DISTRIBUTIONHENYEYGREENSTEIN_H
00007 
00008 #include "Distribution.h"
00009 #include <vector>
00010 
00011 namespace Distributions
00012 {
00013         class DistributionHenyeyGreenstein :public Distribution
00014         {
00015 public:
00016 // LIFECYCLE
00017 
00023                 DistributionHenyeyGreenstein(vector<double> g);
00024 
00030                 DistributionHenyeyGreenstein(double g);
00031 
00035                 ~DistributionHenyeyGreenstein(void);
00036 
00037                 //The class handles multiple g's for multiple wavelengths but is transparent
00038                 //for use as any other Distribution with only one g.
00039 
00040 // OPERATIONS  
00041 
00047                 double GenerateRandomNumber(void) const;
00048 
00056                 double GenerateRandomNumber(int NbrLambda) const;
00057 
00058                 double GetG(void);
00059                 double GetG(int NbrLambda);
00060 private:
00061                 vector<double> mG; //Assymetry factor
00062 
00063                 
00064                 vector<double> mHgPolys[6];//Precalculated values
00065 
00066         }; // DistributionHenyeyGreenstein
00067 } // Distributions
00068 
00069 #endif // DISTRIBUTIONHENYEYGREENSTEIN_H