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

ShiftedRandom Class Reference

#include <newran.h>

Inheritance diagram for ShiftedRandom:

Inheritance graph
[legend]
Collaboration diagram for ShiftedRandom:

Collaboration graph
[legend]

Public Member Functions

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

Private Member Functions

 ShiftedRandom (Random &rvx, Real sx)

Friends

ShiftedRandomoperator+ (Real, Random &)
ShiftedRandomoperator+ (Random &, Real)
ShiftedRandomoperator- (Random &, Real)

Constructor & Destructor Documentation

ShiftedRandom::ShiftedRandom Random rvx,
Real  sx
[inline, private]
 

Definition at line 431 of file newran.h.

00431 : ScaledRandom(rvx, sx) {}


Member Function Documentation

ExtReal ShiftedRandom::Mean  )  const [virtual]
 

Reimplemented from ScaledRandom.

Definition at line 645 of file newran.cpp.

References Random::Mean(), ScaledRandom::rv, and ScaledRandom::s.

00645 { return rv->Mean() + s; }

Real ShiftedRandom::Next  )  [virtual]
 

Reimplemented from ScaledRandom.

Definition at line 643 of file newran.cpp.

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

00643 { return rv->Next() + s; }

ExtReal ShiftedRandom::Variance  )  const [virtual]
 

Reimplemented from ScaledRandom.

Definition at line 647 of file newran.cpp.

References ScaledRandom::rv, and Random::Variance().

00647 { return rv->Variance(); }


Friends And Related Function Documentation

ShiftedRandom& operator+ Random rv,
Real  s
[friend]
 

Definition at line 673 of file newran.cpp.

00674 {
00675    ShiftedRandom* r = new ShiftedRandom(rv, s);
00676    if (!r) ErrorNoSpace(); return *r;
00677 }

ShiftedRandom& operator+ Real  s,
Random rv
[friend]
 

Definition at line 691 of file newran.cpp.

00692 {
00693    ShiftedRandom* r = new ShiftedRandom(rv, s);
00694    if (!r) ErrorNoSpace(); return *r;
00695 }

ShiftedRandom& operator- Random rv,
Real  s
[friend]
 

Definition at line 679 of file newran.cpp.

00680 {
00681    ShiftedRandom* r = new ShiftedRandom(rv, -s);
00682    if (!r) ErrorNoSpace(); return *r;
00683 }


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