RandomGen Class Reference

#include <RandomGen.h>

List of all members.


Detailed Description

Initializes the random generator and generates random numbers.

Definition at line 68 of file RandomGen.h.

Public Member Functions

 RandomGen (void)
 ~RandomGen (void)

Static Public Member Functions

bool Initialized ()
void Initialize ()
int GetRand ()


Constructor & Destructor Documentation

RandomGen::RandomGen void   )  [inline]
 

Definition at line 73 of file RandomGen.h.

00073 {}

RandomGen::~RandomGen void   )  [inline]
 

Definition at line 74 of file RandomGen.h.

00074 {}


Member Function Documentation

int RandomGen::GetRand  )  [static]
 

Definition at line 74 of file RandomGen.cpp.

00075 {
00076     if(!initialized)
00077     {
00078         srand((unsigned)time(0));
00079         initialized = true;
00080     }
00081     return rand();
00082 }

void RandomGen::Initialize  )  [static]
 

Definition at line 68 of file RandomGen.cpp.

Referenced by Vector< T >::Rand(), and Matrix< T >::Rand().

00069 {
00070     srand((unsigned)time(0));
00071     initialized = true;
00072 }

bool RandomGen::Initialized  )  [static]
 

Definition at line 63 of file RandomGen.cpp.

Referenced by Vector< T >::Rand(), and Matrix< T >::Rand().

00064 {
00065     return initialized;
00066 }


The documentation for this class was generated from the following files:
CIMPL 0.1 Code Reference. Copyright © 2004, Baris Sumengen. All rights reserved.