They are copies of random and algorithm headers from the llvm standard library.
Users complained about stability of random numbers across machines when setting seed across different platforms. See issue #379.
As pointed out by @jtibshirani:
the mersenne twister has the same implementation across platforms, the other random methods may differ from compiler to compiler
In PR #469, @halflearned included this reduced copy of the relevant headers, ensuring random number generation is done in a consistent way across compilers.
random.hppExtract only the relevant classes and functions from random.hpp:
__independent_bits_engine__clz__log2__log2_imp__generate_canonicaluniform_int_distributionpoisson_distributionuniform_real_distributionnormal_distributionexponential_distributiondiscrete_distributionFrom each class, remove all methods associated with operator<<.
Find and remove the following _LIBCPP macros:
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ _LIBCPP_CONSTEXPR
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ _LIBCPP_END_NAMESPACE_STD
+ _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+ _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_MSVCRT
+ _LIBCPP_POP_MACROS
+ _LIBCPP_PUSH_MACROS
+ _LIBCPP_RANDOM
+ _LIBCPP_TEMPLATE_VIS
+ _LIBCPP_TYPE_VIS
+ _LIBCPP_USING_DEV_RANDOM
Find and replace prefix:
+ _VSTD:: -> std::
Add namespace nonstd.
algorithm.hppInclude modified random.hpp
Extract relevant class:
shuffleReplace prefix:
std::uniform_int_distribution -> nonstd::uniform_int_distributionAdd namespace nonstd.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.