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

NegatedRandom Class Reference

#include <newran.h>

Inheritance diagram for NegatedRandom:

Inheritance graph
[legend]
Collaboration diagram for NegatedRandom:

Collaboration graph
[legend]

Public Member Functions

Real Next ()
ExtReal Mean () const
ExtReal Variance () const
virtual RandomGetrv (void)

Protected Member Functions

void tDelete ()
 NegatedRandom (Random &rvx)

Protected Attributes

Randomrv

Friends

NegatedRandomoperator- (Random &)

Constructor & Destructor Documentation

NegatedRandom::NegatedRandom Random rvx  )  [inline, protected]
 

Definition at line 377 of file newran.h.

00377 : rv(&rvx) {}


Member Function Documentation

virtual Random* NegatedRandom::Getrv void   )  [inline, virtual]
 

Reimplemented from Random.

Definition at line 383 of file newran.h.

00383 {       return rv;      }

ExtReal NegatedRandom::Mean  )  const [virtual]
 

Reimplemented from Random.

Definition at line 633 of file newran.cpp.

References Random::Mean(), and rv.

00633 { return - rv->Mean(); }

Real NegatedRandom::Next  )  [virtual]
 

Reimplemented from Random.

Definition at line 631 of file newran.cpp.

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

00631 { return - rv->Next(); }

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

Reimplemented from Random.

Definition at line 369 of file newran.h.

References tron.

00370    { 
00371    #ifdef MONITOR
00372       tron << "destructing NegatedRandom\n";
00373    #endif
00374            rv->tDelete(); delete this; 
00375    }

ExtReal NegatedRandom::Variance  )  const [virtual]
 

Reimplemented from Random.

Definition at line 635 of file newran.cpp.

References rv, and Random::Variance().

00635 { return rv->Variance(); }


Friends And Related Function Documentation

NegatedRandom& operator- Random rv  )  [friend]
 

Definition at line 667 of file newran.cpp.

00668 {
00669    NegatedRandom* r = new NegatedRandom(rv);
00670    if (!r) ErrorNoSpace(); return *r;
00671 }


Field Documentation

Random* NegatedRandom::rv [protected]
 

Definition at line 368 of file newran.h.

Referenced by Mean(), Next(), and Variance().


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