• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

RDE_lib2/NormalRandomNumberGenerator.h

00001 /* *************************************************************
00002 
00003 Copyright 2001 - 2010 Terry Lyons and Jessica Gaines
00004 
00005 Distributed under the terms of the GNU General Public License, 
00006 Version 3. (See accompanying file License.txt)
00007 
00008 ************************************************************* */
00009 
00010 
00011 
00012 #pragma once
00013 
00014 #ifndef __NORMALRANDOMNUMBERGENERATOR__
00015 #define __NORMALRANDOMNUMBERGENERATOR__
00016 
00017 
00018 #include <ctime>
00019 #include "stdint.h"
00020 #include "SFMT-seed.h"
00021 
00022 static unsigned long timenow = (unsigned long) time(0);
00023 static unsigned long default_unit[1] = {timenow};
00024 
00026 class NormalRandomNumberGenerator
00027 {
00028 
00029 private:
00030 
00031         int choose_wedge(double);
00032         double tail(double (*func)()); 
00033         double wedge(int, double (*func)()); 
00034         double fastnorm2(double, double (*func)());
00035 
00036 public:
00037 
00039         NormalRandomNumberGenerator( uint32_t init1_key[]=SFMTseedArray , int key_length=SFMTseedArray_size);   
00040         double operator()(double variance = 1);
00041 
00042 };// END CLASS DEFINITION NormalRandomNumberGenerator
00043 
00044 #endif // __NORMALRANDOMNUMBERGENERATOR__

Generated on Fri Jan 14 2011 17:50:33 for Rough Differential Equation Solver by  doxygen 1.7.1