/[dtapublic]/swprojs/trunk/projs/20120418_blackjacksim/source/bjcceval/mt19937.h
ViewVC logotype

Annotation of /swprojs/trunk/projs/20120418_blackjacksim/source/bjcceval/mt19937.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations) (download)
Fri Oct 7 03:35:12 2016 UTC (8 years ago) by dashley
File MIME type: text/plain
File size: 5088 byte(s)
Commit of Blackjack simulation project.
1 dashley 11 //----------------------------------------------------------------------------------------------------
2     //$Header: /home/dashley/cvsrep/e3ft_gpl01/e3ft_gpl01/dtaipubs/cron/2010/blackjack_201010/source/bjcceval/mt19937.h,v 1.2 2012/04/11 01:48:54 dashley Exp $
3     //----------------------------------------------------------------------------------------------------
4     //Copyright (C) 2012, David T. Ashley.
5     //
6     //This file is part of BJCCEVAL, a program that evaluates by simulation
7     //the best basic strategy, card-counting, and other playing strategies
8     //for several variants of the game of Blackjack.
9     //
10     //BJCCEVAL is free software: you can redistribute it and/or modify
11     //it under the terms of the GNU General Public License as published by
12     //the Free Software Foundation, either version 3 of the License, or
13     //(at your option) any later version.
14     //
15     //BJCCEVAL is distributed in the hope that it will be useful,
16     //but WITHOUT ANY WARRANTY; without even the implied warranty of
17     //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18     //GNU General Public License for more details.
19     //
20     //You should have received a copy of the GNU General Public License
21     //along with this program. If not, see <http://www.gnu.org/licenses/>.
22     //(A copy of the GNU General Public License, Version 3 is provided in
23     //the file "COPYING" distributed with BJCCEVAL.)
24     //
25     //David T. Ashley can be contacted at DASHLEY@GMAIL.COM and/or at
26     //P.O. Box 918, Marshall MI 49068.
27     //----------------------------------------------------------------------------------------------------
28     //Additionally, the C source file (other than minor name changes and edits to customize it for the
29     //BJCCEVAL program) is based on the program downloaded from the website of Takuji Nishimura and
30     //Makoto Matsumoto. Their licensing conditions are reproduced verbatim below.
31     //----------------------------------------------------------------------------------------------------
32     //A C-program for MT19937, with initialization improved 2002/1/26.
33     //Coded by Takuji Nishimura and Makoto Matsumoto.
34     //
35     //Before using, initialize the state by using init_genrand(seed)
36     //or init_by_array(init_key, key_length).
37     //
38     //Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
39     //All rights reserved.
40     //
41     //Redistribution and use in source and binary forms, with or without
42     //modification, are permitted provided that the following conditions
43     //are met:
44     //
45     // 1. Redistributions of source code must retain the above copyright
46     // notice, this list of conditions and the following disclaimer.
47     //
48     // 2. Redistributions in binary form must reproduce the above copyright
49     // notice, this list of conditions and the following disclaimer in the
50     // documentation and/or other materials provided with the distribution.
51     //
52     // 3. The names of its contributors may not be used to endorse or promote
53     // products derived from this software without specific prior written
54     // permission.
55     //
56     //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
57     //"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58     //LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
59     //A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
60     //CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
61     //EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
62     //PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
63     //PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
64     //LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
65     //NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
66     //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67     //
68     //Any feedback is very welcome.
69     //http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
70     //email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
71     //----------------------------------------------------------------------------------------------------
72     #ifndef MT19937_INCLUDED
73     #define MT19937_H_INCLUDED
74    
75     #ifdef MODULE_MT19937
76     #define DECMOD_MT19937
77     #else
78     #define DECMOD_MT19937 extern
79     #endif
80    
81     #include <stdio.h>
82    
83     DECMOD_MT19937 unsigned long MT19937_genrand_int32(void);
84    
85     DECMOD_MT19937 const char *MT19937_Vcinfo_C(void);
86     DECMOD_MT19937 const char *MT19937_Vcinfo_H(void);
87    
88     #define MT19937_VCINFO_H "$Revision: 1.2 $"
89    
90     #if defined(P_TEST) || defined(P_TEST_MT19937)
91     DECMOD_MT19937 int MT19937_Test(void);
92     #endif
93    
94     #endif
95    
96     //----------------------------------------------------------------------------------------------------
97     //$Log: mt19937.h,v $
98     //Revision 1.2 2012/04/11 01:48:54 dashley
99     //Edits.
100     //
101     //Revision 1.1 2012/04/11 00:52:58 dashley
102     //Initial checkin.
103     //----------------------------------------------------------------------------------------------------
104     //End of $RCSfile: mt19937.h,v $
105     //----------------------------------------------------------------------------------------------------

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25