<commit_before>/*
 * Modifications of original are
 *
 * Copyright (C) 2010-2011 OpenCog Foundation
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License v3 as
 * published by the Free Software Foundation and including the exceptions
 * at http://opencog.org/wiki/Licenses
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program; if not, write to:
 * Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef _OPENCOG_MT19937AR_H
#define _OPENCOG_MT19937AR_H

// Once C++11 is fully supported by GCC feel free to remove anything
// wrapped by #ifndef USE_STL_RANDOM  Note that this is not yet
// supported as of gcc 4.6.2 and that this is the current version of gcc
// shipped on most popular distros, as of first-half 2012.
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 7)
#define USE_STL_RANDOM
#endif

#ifndef USE_STL_RANDOM
/* 
   A C-program for MT19937, with initialization improved 2002/1/26.
   Coded by <NAME> and <NAME>.

   Before using, initialize the state by using init_genrand(seed)  
   or init_by_array(init_key, key_length).

   Copyright (C) 1997 - 2002, <NAME> and <NAME>,
   All rights reserved.    
   
   Broken down into header, source and unit test file by <NAME>,
   2008.                      

   Redistribution and use in source and binary forms, with or without<commit_msg>More random-number generator fiddling;<commit_after>/*
 * Modifications of original are
 *
 * Copyright (C) 2010-2011 OpenCog Foundation
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License v3 as
 * published by the Free Software Foundation and including the exceptions
 * at http://opencog.org/wiki/Licenses
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program; if not, write to:
 * Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef _OPENCOG_MT19937AR_H
#define _OPENCOG_MT19937AR_H

// Once C++11 is fully supported by GCC feel free to remove anything
// wrapped by #ifndef USE_STL_RANDOM  
// The situation is confusing... According to gnu.org, this has been
// supported since gcc-4.3 (but possibly in the tr1 namespace ??)
// In Ubuntu oneiric, with gcc-4.6.2, the build failed.
//  With gcc-4.6.3, things work.  I'm confused. This
// needs more user reports.
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 6)
#define USE_STL_RANDOM
#endif

#ifndef USE_STL_RANDOM
/* 
   A C-program for MT19937, with initialization improved 2002/1/26.
   Coded by <NAME> and <NAME>.

   Before using, initialize the state by using init_genrand(seed)  
   or init_by_array(init_key, key_length).

   Copyright (C) 1997 - 2002, <NAME> and <NAME>,
   All rights reserved.    
   
   Broken down into header, source and unit test file by <NAME>,
   2008.                      

   Redistribution and use in source and binary forms, with or without
{'fraction_non_alphanumeric': 0.07330415754923414, 'fraction_numerical': 0.036105032822757115, 'mean_word_length': 3.4434993924665855, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6684979', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1038, 'n_words': 485}