<commit_before>/*

   Copyright (c) 2011, The Chinese University of Hong Kong

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

*/

#pragma once
#ifndef IDOCK_COMMON_HPP
#define IDOCK_COMMON_HPP

#include <vector>
#include <string>
#include <boost/lexical_cast.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/random.hpp>
#include <boost/assert.hpp>

namespace idock
{
	// These classes are widely used across the entire program.
	using std::vector;
	using std::string;
	using boost::lexical_cast;
	using boost::filesystem::path;

	/// igrow uses double precision floating point computation by default.
	/// This could possible be demoted to single precision for better performance.
	typedef double fl;

	// Choose the appropriate Mersenne Twister engine for random number generation on 32-bit or 64-bit platform.
#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
	typedef boost::random::mt19937_64 mt19937eng;
#else
	typedef boost::random::mt19937 mt19937eng;
#endif

	const fl epsilon = static_cast<fl>(0.00001); ///< Tolerance for equality comparison of two floating point values.

	/// Returns true if the absolute difference between two floating point values is within the constant tolerance.<commit_msg>Demoted typedef fl from double to float in order to save memory<commit_after>/*

   Copyright (c) 2011, The Chinese University of Hong Kong

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

*/

#pragma once
#ifndef IDOCK_COMMON_HPP
#define IDOCK_COMMON_HPP

#include <vector>
#include <string>
#include <boost/lexical_cast.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/random.hpp>
#include <boost/assert.hpp>

namespace idock
{
	// These classes are widely used across the entire program.
	using std::vector;
	using std::string;
	using boost::lexical_cast;
	using boost::filesystem::path;

	/// Use single precision floating point due to the fact that only 4GB RAM is installed on Mac workstations.
	typedef float fl;

	// Choose the appropriate Mersenne Twister engine for random number generation on 32-bit or 64-bit platform.
#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
	typedef boost::random::mt19937_64 mt19937eng;
#else
	typedef boost::random::mt19937 mt19937eng;
#endif

	const fl epsilon = static_cast<fl>(0.00001); ///< Tolerance for equality comparison of two floating point values.

	/// Returns true if the absolute difference between two floating point values is within the constant tolerance.
{'fraction_non_alphanumeric': 0.08051082731815658, 'fraction_numerical': 0.031371460299833426, 'mean_word_length': 4.475683890577508, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6463256', 'n_tokens_mistral': 1084, 'n_tokens_neox': 978, 'n_words': 422}