Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Gamma2 Class Reference

Inheritance diagram for Gamma2:

Inheritance graph
[legend]
Collaboration diagram for Gamma2:

Collaboration graph
[legend]

Public Member Functions

 Gamma2 (Real)
Real Density (Real) const
ExtReal Mean () const
ExtReal Variance () const

Private Attributes

Real alpha
Real ln_gam

Constructor & Destructor Documentation

Gamma2::Gamma2 Real   ) 
 

Definition at line 515 of file newran.cpp.

References alpha, ln_gam, and ln_gamma().

00515                           : AsymGen(alphax-1.0) // constructor (Real=shape)
00516 { alpha=alphax; ln_gam=ln_gamma(alpha); }


Member Function Documentation

Real Gamma2::Density Real   )  const [virtual]
 

Reimplemented from Random.

Definition at line 518 of file newran.cpp.

References Real.

00519 {
00520    if (x<=0.0) return 0.0;
00521    double l = (alpha-1.0)*log(x) - x - ln_gam;
00522    return  (l < -40.0) ? 0.0 : exp(l);
00523 }

ExtReal Gamma2::Mean  )  const [inline, virtual]
 

Reimplemented from AsymGen.

Definition at line 82 of file newran.cpp.

00082 { return alpha; }

ExtReal Gamma2::Variance  )  const [inline, virtual]
 

Reimplemented from AsymGen.

Definition at line 83 of file newran.cpp.

00083 { return alpha; }


Field Documentation

Real Gamma2::alpha [private]
 

Definition at line 78 of file newran.cpp.

Referenced by Gamma2().

Real Gamma2::ln_gam [private]
 

Definition at line 78 of file newran.cpp.

Referenced by Gamma2().


The documentation for this class was generated from the following file:
Generated on Fri Dec 5 04:06:22 2003 for Borqueror by doxygen 1.3.3