ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
bet_rand.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2009-2012 ADMB foundation
00006  */
00011 #include <fvar.hpp>
00012 #ifndef OPT_LIB
00013   #include <cassert>
00014   #include <climits>
00015 #endif
00016 
00021 double better_rand(long int& idum)
00022 {
00023 #ifndef OPT_LIB
00024   assert(idum <= INT_MAX);
00025 #endif
00026   random_number_generator rng((int)idum);
00027   double rr = ((random_number_generator&) rng).better_rand();
00028   return rr;
00029 }