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

Gamma1 Class Reference

Inheritance diagram for Gamma1:

Inheritance graph
[legend]
Collaboration diagram for Gamma1:

Collaboration graph
[legend]

Public Member Functions

 Gamma1 (Real)
Real Density (Real) const
Real Next ()
ExtReal Mean () const
ExtReal Variance () const

Private Attributes

Real ln_gam
Real ralpha
Real alpha

Constructor & Destructor Documentation

Gamma1::Gamma1 Real   ) 
 

Definition at line 503 of file newran.cpp.

References alpha, ln_gam, ln_gamma(), and ralpha.

00504 { ralpha=1.0/alphax; ln_gam=ln_gamma(alphax+1.0); alpha=alphax; }


Member Function Documentation

Real Gamma1::Density Real   )  const [virtual]
 

Reimplemented from Random.

Definition at line 506 of file newran.cpp.

References Real.

00507 {                                                // transformed gamma
00508    Real l = - pow(x,ralpha) - ln_gam;
00509    return  (l < -40.0) ? 0.0 : exp(l);
00510 }

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

Reimplemented from PosGen.

Definition at line 69 of file newran.cpp.

00069 { return alpha; }

Real Gamma1::Next  )  [virtual]
 

Reimplemented from PosGen.

Definition at line 512 of file newran.cpp.

References PosGen::Next(), ralpha, and Real.

00513 { return pow(PosGen::Next(),ralpha); }

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

Reimplemented from PosGen.

Definition at line 70 of file newran.cpp.

00070 { return alpha; }


Field Documentation

Real Gamma1::alpha [private]
 

Definition at line 64 of file newran.cpp.

Referenced by Gamma1().

Real Gamma1::ln_gam [private]
 

Definition at line 64 of file newran.cpp.

Referenced by Gamma1().

Real Gamma1::ralpha [private]
 

Definition at line 64 of file newran.cpp.

Referenced by Gamma1(), and Next().


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