cmersennetwister.h

00001 //==========================================================================
00002 //  CMERSENNETWISTER.CC - part of
00003 //                 OMNeT++/OMNEST
00004 //              Discrete System Simulation in C++
00005 //
00006 // Contents:
00007 //   class cMersenneTwister
00008 //
00009 //==========================================================================
00010 
00011 /*--------------------------------------------------------------*
00012   Copyright (C) 2002-2008 Andras Varga
00013   Copyright (C) 2006-2008 OpenSim Ltd.
00014 
00015   This file is distributed WITHOUT ANY WARRANTY. See the file
00016   `license' for details on this and other legal matters.
00017 *--------------------------------------------------------------*/
00018 
00019 #ifndef __CMERSENNETWISTER_H
00020 #define __CMERSENNETWISTER_H
00021 
00022 #include "simkerneldefs.h"
00023 #include "globals.h"
00024 #include "crng.h"
00025 #include "cconfiguration.h"
00026 #include "mersennetwister.h"
00027 
00028 NAMESPACE_BEGIN
00029 
00030 
00043 class SIM_API cMersenneTwister : public cRNG
00044 {
00045   protected:
00046     MTRand rng;
00047 
00048   public:
00049     cMersenneTwister() {}
00050     virtual ~cMersenneTwister() {}
00051 
00053     virtual void initialize(int seedSet, int rngId, int numRngs,
00054                             int parsimProcId, int parsimNumPartitions,
00055                             cConfiguration *cfg);
00056 
00058     virtual void selfTest();
00059 
00061     virtual unsigned long intRand();
00062 
00064     virtual unsigned long intRandMax();
00065 
00067     virtual unsigned long intRand(unsigned long n);
00068 
00070     virtual double doubleRand();
00071 
00073     virtual double doubleRandNonz();
00074 
00076     virtual double doubleRandIncl1();
00077 };
00078 
00079 NAMESPACE_END
00080 
00081 
00082 #endif
00083 
Generated on Tue Dec 2 11:16:27 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3