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

Gamma Class Reference

#include <newran.h>

Inheritance diagram for Gamma:

Inheritance graph
[legend]
Collaboration diagram for Gamma:

Collaboration graph
[legend]

Public Member Functions

char * Name ()
 Gamma (Real)
virtual ~Gamma ()
Real Next ()
ExtReal Mean () const
ExtReal Variance () const

Private Member Functions

void operator= (const Gamma &)

Private Attributes

Randommethod

Constructor & Destructor Documentation

Gamma::Gamma Real   ) 
 

Definition at line 525 of file newran.cpp.

References ErrorNoSpace(), and method.

00526 {
00527    if (alpha<1.0) method = new Gamma1(alpha);
00528    else if (alpha==1.0) method = new Exponential();
00529    else method = new Gamma2(alpha);
00530    if (!method)  ErrorNoSpace();
00531 }

virtual Gamma::~Gamma  )  [inline, virtual]
 

Definition at line 217 of file newran.h.

References tron.

00218    { 
00219    #ifdef MONITOR
00220       tron << "destructing Gamma\n";
00221    #endif
00222            delete method; 
00223    }


Member Function Documentation

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

Reimplemented from Random.

Definition at line 225 of file newran.h.

00225 { return method->Mean(); }

char * Gamma::Name  )  [virtual]
 

Reimplemented from Random.

Definition at line 918 of file newran.cpp.

00918 { return "Gamma";            }

Real Gamma::Next  )  [inline, virtual]
 

Reimplemented from Random.

Definition at line 224 of file newran.h.

References Real.

00224 { return method->Next(); }

void Gamma::operator= const Gamma  )  [inline, private]
 

Definition at line 211 of file newran.h.

00211 {}        // private so can't access

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

Reimplemented from Random.

Definition at line 226 of file newran.h.

00226 { return method->Variance(); }


Field Documentation

Random* Gamma::method [private]
 

Definition at line 212 of file newran.h.

Referenced by Gamma().


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