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

Normal Class Reference

#include <newran.h>

Inheritance diagram for Normal:

Inheritance graph
[legend]
Collaboration diagram for Normal:

Collaboration graph
[legend]

Public Member Functions

char * Name ()
 Normal ()
virtual ~Normal ()
Real Density (Real) const
ExtReal Mean () const
ExtReal Variance () const

Private Member Functions

void operator= (const Normal &)

Static Private Attributes

Real Nxi
RealNsx
RealNsfx
long count = 0

Constructor & Destructor Documentation

Normal::Normal  ) 
 

Definition at line 339 of file newran.cpp.

References PosGen::Build(), count, PosGen::NotReady, Nsfx, Nsx, Nxi, PosGen::sfx, PosGen::sx, and PosGen::xi.

00340 {
00341    if (count) { NotReady=false; xi=Nxi; sx=Nsx; sfx=Nsfx; }
00342    else { Build(true); Nxi=xi; Nsx=sx; Nsfx=sfx; }
00343    count++;
00344 }

Normal::~Normal  )  [virtual]
 

Definition at line 346 of file newran.cpp.

References count, and PosGen::NotReady.

00347 {
00348    count--;
00349    if (count) NotReady=true;                     // disable freeing arrays
00350 }


Member Function Documentation

Real Normal::Density Real   )  const [virtual]
 

Reimplemented from Random.

Definition at line 352 of file newran.cpp.

References Real.

00353 { return (fabs(x)>8.0) ? 0 : 0.398942280 * exp(-x*x / 2); }

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

Reimplemented from PosGen.

Reimplemented in ChiSq1.

Definition at line 137 of file newran.h.

00137 { return 0.0; }

char * Normal::Name  )  [virtual]
 

Reimplemented from SymGen.

Definition at line 911 of file newran.cpp.

00911 { return "Normal";           }

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

Definition at line 128 of file newran.h.

00128 {}       // private so can't access

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

Reimplemented from PosGen.

Reimplemented in ChiSq1.

Definition at line 138 of file newran.h.

00138 { return 1.0; }


Field Documentation

long Normal::count = 0 [static, private]
 

Definition at line 120 of file newran.cpp.

Referenced by Normal(), and ~Normal().

Real * Normal::Nsfx [static, private]
 

Definition at line 119 of file newran.cpp.

Referenced by Normal().

Real * Normal::Nsx [static, private]
 

Definition at line 118 of file newran.cpp.

Referenced by Normal().

Real Normal::Nxi [static, private]
 

Definition at line 117 of file newran.cpp.

Referenced by Normal().


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