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

ReciprocalRandom Class Reference

#include <newran.h>

Inheritance diagram for ReciprocalRandom:

Inheritance graph
[legend]
Collaboration diagram for ReciprocalRandom:

Collaboration graph
[legend]

Public Member Functions

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

Protected Member Functions

 ReciprocalRandom (Random &rvx, Real sx)
void tDelete ()

Protected Attributes

Randomrv
Real s

Friends

ReciprocalRandomoperator/ (Real, Random &)

Constructor & Destructor Documentation

ReciprocalRandom::ReciprocalRandom Random rvx,
Real  sx
[inline, protected]
 

Definition at line 413 of file newran.h.

00413 : rv(&rvx), s(sx) {}


Member Function Documentation

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

Reimplemented from Random.

Definition at line 424 of file newran.h.

References Missing.

00424 { return Missing; }

Real ReciprocalRandom::Next  )  [virtual]
 

Reimplemented from Random.

Definition at line 655 of file newran.cpp.

References Random::Next(), Real, rv, and s.

00655 { return s / rv->Next(); }

void ReciprocalRandom::tDelete  )  [inline, protected, virtual]
 

Reimplemented from Random.

Definition at line 414 of file newran.h.

References tron.

00415    { 
00416    #ifdef MONITOR
00417       tron << "destructing ReciprocalRandom\n";
00418    #endif
00419            rv->tDelete(); delete this; 
00420    }

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

Reimplemented from Random.

Definition at line 425 of file newran.h.

References Missing.

00425 { return Missing; }


Friends And Related Function Documentation

ReciprocalRandom& operator/ Real  s,
Random rv
[friend]
 

Definition at line 715 of file newran.cpp.

00716 {
00717    ReciprocalRandom* r = new ReciprocalRandom(rv, s);
00718    if (!r) ErrorNoSpace(); return *r;
00719 }


Field Documentation

Random* ReciprocalRandom::rv [protected]
 

Definition at line 412 of file newran.h.

Referenced by Next().

Real ReciprocalRandom::s [protected]
 

Definition at line 412 of file newran.h.

Referenced by Next().


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