randomgen 2.0.1__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- randomgen/__init__.py +89 -0
- randomgen/_deprecated_value.py +22 -0
- randomgen/_pickle.py +127 -0
- randomgen/_register.py +62 -0
- randomgen/_seed_sequence.c +21913 -0
- randomgen/_seed_sequence.cp313-win_amd64.pyd +0 -0
- randomgen/_seed_sequence.pxd +18 -0
- randomgen/_seed_sequence.pyi +39 -0
- randomgen/_seed_sequence.pyx +481 -0
- randomgen/_version.py +16 -0
- randomgen/aes.c +17774 -0
- randomgen/aes.cp313-win_amd64.pyd +0 -0
- randomgen/aes.pxd +40 -0
- randomgen/aes.pyi +33 -0
- randomgen/aes.pyx +419 -0
- randomgen/api.pxd +35 -0
- randomgen/bounded_integers.pxd +42 -0
- randomgen/bounded_integers.pxd.in +39 -0
- randomgen/bounded_integers.pyx +1524 -0
- randomgen/bounded_integers.pyx.in +307 -0
- randomgen/chacha.c +15763 -0
- randomgen/chacha.cp313-win_amd64.pyd +0 -0
- randomgen/chacha.pxd +34 -0
- randomgen/chacha.pyi +31 -0
- randomgen/chacha.pyx +297 -0
- randomgen/common.c +38590 -0
- randomgen/common.cp313-win_amd64.pyd +0 -0
- randomgen/common.pxd +183 -0
- randomgen/common.pyi +30 -0
- randomgen/common.pyx +1335 -0
- randomgen/conftest.py +24 -0
- randomgen/distributions.pxd +33 -0
- randomgen/dsfmt.c +34300 -0
- randomgen/dsfmt.cp313-win_amd64.pyd +0 -0
- randomgen/dsfmt.pxd +45 -0
- randomgen/dsfmt.pyi +21 -0
- randomgen/dsfmt.pyx +295 -0
- randomgen/efiix64.c +14496 -0
- randomgen/efiix64.cp313-win_amd64.pyd +0 -0
- randomgen/efiix64.pxd +27 -0
- randomgen/efiix64.pyi +16 -0
- randomgen/efiix64.pyx +225 -0
- randomgen/entropy.c +32770 -0
- randomgen/entropy.cp313-win_amd64.pyd +0 -0
- randomgen/entropy.pyi +9 -0
- randomgen/entropy.pyx +169 -0
- randomgen/examples/cython/extending.pyx +70 -0
- randomgen/examples/cython/extending_distributions.pyx +54 -0
- randomgen/examples/cython/low_level.pyx +51 -0
- randomgen/examples/cython/setup.py +35 -0
- randomgen/examples/numba/extending.py +79 -0
- randomgen/examples/numba/extending_distributions.py +63 -0
- randomgen/generator.c +31584 -0
- randomgen/generator.cp313-win_amd64.pyd +0 -0
- randomgen/generator.pyi +160 -0
- randomgen/generator.pyx +1229 -0
- randomgen/hc128.c +13982 -0
- randomgen/hc128.cp313-win_amd64.pyd +0 -0
- randomgen/hc128.pxd +25 -0
- randomgen/hc128.pyi +24 -0
- randomgen/hc128.pyx +234 -0
- randomgen/jsf.c +17122 -0
- randomgen/jsf.cp313-win_amd64.pyd +0 -0
- randomgen/jsf.pxd +43 -0
- randomgen/jsf.pyi +20 -0
- randomgen/jsf.pyx +330 -0
- randomgen/legacy/__init__.py +3 -0
- randomgen/legacy/bounded_integers.pxd +42 -0
- randomgen/legacy/bounded_integers.pxd.in +39 -0
- randomgen/legacy/bounded_integers.pyx +813 -0
- randomgen/legacy/bounded_integers.pyx.in +122 -0
- randomgen/legacy/distributions.pxd +66 -0
- randomgen/lxm.c +15515 -0
- randomgen/lxm.cp313-win_amd64.pyd +0 -0
- randomgen/lxm.pxd +26 -0
- randomgen/lxm.pyi +20 -0
- randomgen/lxm.pyx +297 -0
- randomgen/mt19937.c +16327 -0
- randomgen/mt19937.cp313-win_amd64.pyd +0 -0
- randomgen/mt19937.pxd +27 -0
- randomgen/mt19937.pyi +27 -0
- randomgen/mt19937.pyx +323 -0
- randomgen/mt64.c +14516 -0
- randomgen/mt64.cp313-win_amd64.pyd +0 -0
- randomgen/mt64.pxd +25 -0
- randomgen/mt64.pyi +18 -0
- randomgen/mt64.pyx +179 -0
- randomgen/mtrand.pyi +59 -0
- randomgen/mtrand.pyx +169 -0
- randomgen/pcg32.c +15269 -0
- randomgen/pcg32.cp313-win_amd64.pyd +0 -0
- randomgen/pcg32.pxd +27 -0
- randomgen/pcg32.pyi +19 -0
- randomgen/pcg32.pyx +307 -0
- randomgen/pcg64.c +26617 -0
- randomgen/pcg64.cp313-win_amd64.pyd +0 -0
- randomgen/pcg64.pxd +82 -0
- randomgen/pcg64.pyi +63 -0
- randomgen/pcg64.pyx +1138 -0
- randomgen/philox.c +20165 -0
- randomgen/philox.cp313-win_amd64.pyd +0 -0
- randomgen/philox.pxd +103 -0
- randomgen/philox.pxd.in +68 -0
- randomgen/philox.pyi +35 -0
- randomgen/philox.pyx +568 -0
- randomgen/py.typed +0 -0
- randomgen/rdrand.c +36841 -0
- randomgen/rdrand.cp313-win_amd64.pyd +0 -0
- randomgen/rdrand.pxd +18 -0
- randomgen/rdrand.pyi +32 -0
- randomgen/rdrand.pyx +479 -0
- randomgen/romu.c +15474 -0
- randomgen/romu.cp313-win_amd64.pyd +0 -0
- randomgen/romu.pxd +29 -0
- randomgen/romu.pyi +16 -0
- randomgen/romu.pyx +207 -0
- randomgen/seed_sequence.py +29 -0
- randomgen/sfc.c +17787 -0
- randomgen/sfc.cp313-win_amd64.pyd +0 -0
- randomgen/sfc.pxd +26 -0
- randomgen/sfc.pyi +24 -0
- randomgen/sfc.pyx +377 -0
- randomgen/sfmt.c +34744 -0
- randomgen/sfmt.cp313-win_amd64.pyd +0 -0
- randomgen/sfmt.pxd +43 -0
- randomgen/sfmt.pyi +21 -0
- randomgen/sfmt.pyx +305 -0
- randomgen/speck128.c +16816 -0
- randomgen/speck128.cp313-win_amd64.pyd +0 -0
- randomgen/speck128.pxd +40 -0
- randomgen/speck128.pyi +38 -0
- randomgen/speck128.pyx +440 -0
- randomgen/src/aesctr/LICENSE.md +232 -0
- randomgen/src/aesctr/aesctr-test-data-gen.c +86 -0
- randomgen/src/aesctr/aesctr.c +210 -0
- randomgen/src/aesctr/aesctr.h +142 -0
- randomgen/src/aesctr/aesctr.orig.h +133 -0
- randomgen/src/aesctr/softaes.h +217 -0
- randomgen/src/aesctr/tiny-aes.c +572 -0
- randomgen/src/aesctr/tiny-aes.h +90 -0
- randomgen/src/aligned_malloc/aligned_malloc.c +9 -0
- randomgen/src/aligned_malloc/aligned_malloc.h +54 -0
- randomgen/src/chacha/LICENSE.md +16 -0
- randomgen/src/chacha/chacha-benchmark.cpp +33 -0
- randomgen/src/chacha/chacha-test-data-gen.cpp +48 -0
- randomgen/src/chacha/chacha-v1.c +193 -0
- randomgen/src/chacha/chacha.c +68 -0
- randomgen/src/chacha/chacha.h +217 -0
- randomgen/src/chacha/chacha.orig.h +306 -0
- randomgen/src/common/LICENSE.md +29 -0
- randomgen/src/common/array.h +348 -0
- randomgen/src/common/cpu_features.c +54 -0
- randomgen/src/common/cpu_features.h +26 -0
- randomgen/src/common/features/clangfeatures.h +93 -0
- randomgen/src/common/features/compilerfeatures.h +344 -0
- randomgen/src/common/features/gccfeatures.h +263 -0
- randomgen/src/common/features/iccfeatures.h +212 -0
- randomgen/src/common/features/metalfeatures.h +111 -0
- randomgen/src/common/features/msvcfeatures.h +200 -0
- randomgen/src/common/features/nvccfeatures.h +125 -0
- randomgen/src/common/features/open64features.h +50 -0
- randomgen/src/common/features/openclfeatures.h +89 -0
- randomgen/src/common/features/pgccfeatures.h +194 -0
- randomgen/src/common/features/sse.h +280 -0
- randomgen/src/common/features/sunprofeatures.h +172 -0
- randomgen/src/common/features/xlcfeatures.h +210 -0
- randomgen/src/common/inttypes.h +305 -0
- randomgen/src/common/randomgen_config.h +85 -0
- randomgen/src/common/randomgen_config_numpy.h +25 -0
- randomgen/src/common/randomgen_endian.h +83 -0
- randomgen/src/common/randomgen_immintrin.h +30 -0
- randomgen/src/common/standalone/Python.h +11 -0
- randomgen/src/common/standalone/aligned_malloc.h +29 -0
- randomgen/src/common/standalone/npy_common.h +25 -0
- randomgen/src/common/standalone/npy_math.h +28 -0
- randomgen/src/common/stdbool.h +13 -0
- randomgen/src/common/stdint.h +258 -0
- randomgen/src/distributions/LICENSE.md +61 -0
- randomgen/src/distributions/binomial.h +0 -0
- randomgen/src/distributions/distributions.orig.c +1707 -0
- randomgen/src/distributions/distributions.orig.h +347 -0
- randomgen/src/distributions/hypergeometric.c +260 -0
- randomgen/src/distributions/logfactorial.c +158 -0
- randomgen/src/distributions/logfactorial.h +9 -0
- randomgen/src/distributions/loggam.h +45 -0
- randomgen/src/distributions/rg-distributions.c +90 -0
- randomgen/src/distributions/rg-distributions.h +54 -0
- randomgen/src/distributions/ziggurat.h +276 -0
- randomgen/src/distributions/ziggurat_constants.h +1196 -0
- randomgen/src/dsfmt/128-bit-jump.poly.txt +2 -0
- randomgen/src/dsfmt/96-bit-jump.poly.txt +2 -0
- randomgen/src/dsfmt/LICENSE.md +34 -0
- randomgen/src/dsfmt/calc-jump.cpp +81 -0
- randomgen/src/dsfmt/dSFMT-benchmark.c +43 -0
- randomgen/src/dsfmt/dSFMT-calc-jump.hpp +106 -0
- randomgen/src/dsfmt/dSFMT-common.h +115 -0
- randomgen/src/dsfmt/dSFMT-jump.c +184 -0
- randomgen/src/dsfmt/dSFMT-jump.h +29 -0
- randomgen/src/dsfmt/dSFMT-params.h +87 -0
- randomgen/src/dsfmt/dSFMT-params19937.h +40 -0
- randomgen/src/dsfmt/dSFMT-poly.h +351 -0
- randomgen/src/dsfmt/dSFMT-test-gen.c +58 -0
- randomgen/src/dsfmt/dsfmt-test-data-seed.h +1538 -0
- randomgen/src/dsfmt/dsfmt.c +656 -0
- randomgen/src/dsfmt/dsfmt.h +694 -0
- randomgen/src/efiix64/efiix64-test-gen.cpp +53 -0
- randomgen/src/efiix64/efiix64.c +60 -0
- randomgen/src/efiix64/efiix64.h +62 -0
- randomgen/src/entropy/LICENSE.md +25 -0
- randomgen/src/entropy/entropy.c +173 -0
- randomgen/src/entropy/entropy.h +34 -0
- randomgen/src/hc-128/hc-128-test-data-gen.c +87 -0
- randomgen/src/hc-128/hc-128.c +58 -0
- randomgen/src/hc-128/hc-128.h +127 -0
- randomgen/src/hc-128/hc-128.orig.c +98 -0
- randomgen/src/hc-128/hc-128.orig.h +39 -0
- randomgen/src/hc-128/hc128_ref.h +189 -0
- randomgen/src/hc-128/util.orig.c +49 -0
- randomgen/src/hc-128/util.orig.h +22 -0
- randomgen/src/jsf/jsf-test-data-gen.cpp +63 -0
- randomgen/src/jsf/jsf.c +34 -0
- randomgen/src/jsf/jsf.h +122 -0
- randomgen/src/jsf/jsf.hpp +179 -0
- randomgen/src/legacy/LICENSE.md +30 -0
- randomgen/src/legacy/legacy-distributions.c +492 -0
- randomgen/src/legacy/legacy-distributions.h +62 -0
- randomgen/src/lxm/lxm-test-data-gen.c +73 -0
- randomgen/src/lxm/lxm.c +62 -0
- randomgen/src/lxm/lxm.h +76 -0
- randomgen/src/mt19937/LICENSE.md +61 -0
- randomgen/src/mt19937/clist_mt19937.txt +1 -0
- randomgen/src/mt19937/generate-jump-test.py +110 -0
- randomgen/src/mt19937/jump_mt19937-orig.c +299 -0
- randomgen/src/mt19937/jump_mt19937.c +351 -0
- randomgen/src/mt19937/mt119937-test-data-seed.h +1258 -0
- randomgen/src/mt19937/mt19937-benchmark.c +31 -0
- randomgen/src/mt19937/mt19937-generate-jump-poly.c +190 -0
- randomgen/src/mt19937/mt19937-jump.c +159 -0
- randomgen/src/mt19937/mt19937-jump.h +15 -0
- randomgen/src/mt19937/mt19937-poly.h +1639 -0
- randomgen/src/mt19937/mt19937-test-data-gen.c +57 -0
- randomgen/src/mt19937/mt19937.c +166 -0
- randomgen/src/mt19937/mt19937.h +60 -0
- randomgen/src/mt19937/poly-128.txt +1 -0
- randomgen/src/mt19937/randomkit.c +649 -0
- randomgen/src/mt19937/randomkit.h +225 -0
- randomgen/src/mt64/mt64-test-data-gen.c +64 -0
- randomgen/src/mt64/mt64-test-data-seed.h +634 -0
- randomgen/src/mt64/mt64.c +138 -0
- randomgen/src/mt64/mt64.h +123 -0
- randomgen/src/mt64/mt64.orig.c +168 -0
- randomgen/src/mt64/mt64.orig.h +81 -0
- randomgen/src/pcg32/LICENSE.md +22 -0
- randomgen/src/pcg32/pcg-advance-64.c +62 -0
- randomgen/src/pcg32/pcg32-test-data-gen.c +66 -0
- randomgen/src/pcg32/pcg32.c +30 -0
- randomgen/src/pcg32/pcg32.h +82 -0
- randomgen/src/pcg32/pcg_variants.h +2210 -0
- randomgen/src/pcg64/LICENSE.md +22 -0
- randomgen/src/pcg64/lcg128mix.c +39 -0
- randomgen/src/pcg64/lcg128mix.h +106 -0
- randomgen/src/pcg64/pcg64-benchmark.c +41 -0
- randomgen/src/pcg64/pcg64-common.c +38 -0
- randomgen/src/pcg64/pcg64-common.h +145 -0
- randomgen/src/pcg64/pcg64-test-data-gen.c +77 -0
- randomgen/src/pcg64/pcg64-v2.c +70 -0
- randomgen/src/pcg64/pcg64-v2.h +149 -0
- randomgen/src/pcg64/pcg64.c +183 -0
- randomgen/src/pcg64/pcg64.h +388 -0
- randomgen/src/pcg64/pcg64.orig.c +11 -0
- randomgen/src/pcg64/pcg64.orig.h +2025 -0
- randomgen/src/pcg64/pcg64_xslrr-test-data-gen.cpp +64 -0
- randomgen/src/pcg64/pcg_dxsm-test-data-gen.cpp +58 -0
- randomgen/src/pcg64/pcg_extras.hpp +664 -0
- randomgen/src/pcg64/pcg_random.hpp +1947 -0
- randomgen/src/pcg64/pcg_uint128.hpp +884 -0
- randomgen/src/pcg64/pcg_xslrr-test-data-gen.cpp +60 -0
- randomgen/src/philox/LICENSE.md +31 -0
- randomgen/src/philox/philox-4x32-test-data-gen.c +84 -0
- randomgen/src/philox/philox-benchmark.c +38 -0
- randomgen/src/philox/philox-test-data-gen.c +84 -0
- randomgen/src/philox/philox.c +48 -0
- randomgen/src/philox/philox.h +495 -0
- randomgen/src/rdrand/rdrand.c +17 -0
- randomgen/src/rdrand/rdrand.h +119 -0
- randomgen/src/romu/romu-orig.h +154 -0
- randomgen/src/romu/romu-test-data-gen.c +130 -0
- randomgen/src/romu/romu.c +21 -0
- randomgen/src/romu/romu.h +105 -0
- randomgen/src/sfc/sfc-test-data-gen.c +81 -0
- randomgen/src/sfc/sfc.c +15 -0
- randomgen/src/sfc/sfc.h +90 -0
- randomgen/src/sfmt/SFMT-calc-jump.hpp +106 -0
- randomgen/src/sfmt/calc-jump.cpp +88 -0
- randomgen/src/sfmt/sfmt-alti.h +157 -0
- randomgen/src/sfmt/sfmt-common.h +161 -0
- randomgen/src/sfmt/sfmt-jump.c +129 -0
- randomgen/src/sfmt/sfmt-jump.h +28 -0
- randomgen/src/sfmt/sfmt-neon.h +115 -0
- randomgen/src/sfmt/sfmt-params.h +98 -0
- randomgen/src/sfmt/sfmt-params19937.h +58 -0
- randomgen/src/sfmt/sfmt-poly.h +349 -0
- randomgen/src/sfmt/sfmt-sse2-msc.h +308 -0
- randomgen/src/sfmt/sfmt-sse2.h +115 -0
- randomgen/src/sfmt/sfmt-test-data-seed.h +1258 -0
- randomgen/src/sfmt/sfmt-test-gen.c +53 -0
- randomgen/src/sfmt/sfmt.c +468 -0
- randomgen/src/sfmt/sfmt.h +352 -0
- randomgen/src/speck-128/speck-128-common.h +46 -0
- randomgen/src/speck-128/speck-128-sse.h +144 -0
- randomgen/src/speck-128/speck-128.c +86 -0
- randomgen/src/speck-128/speck-128.h +142 -0
- randomgen/src/speck-128/speck-128.ref.c +125 -0
- randomgen/src/speck-128/speck-test-data-gen.cpp +90 -0
- randomgen/src/splitmix64/LICENSE.md +9 -0
- randomgen/src/splitmix64/splitmix64.c +29 -0
- randomgen/src/splitmix64/splitmix64.h +30 -0
- randomgen/src/splitmix64/splitmix64.orig.c +28 -0
- randomgen/src/threefry/LICENSE.md +31 -0
- randomgen/src/threefry/threefry-benchmark.c +38 -0
- randomgen/src/threefry/threefry-orig.c +83 -0
- randomgen/src/threefry/threefry-test-data-gen.c +88 -0
- randomgen/src/threefry/threefry.c +48 -0
- randomgen/src/threefry/threefry.h +869 -0
- randomgen/src/threefry/threefry4x32-test-data-gen.c +90 -0
- randomgen/src/xoroshiro128/LICENSE.md +9 -0
- randomgen/src/xoroshiro128/xoroshiro128-benchmark.c +35 -0
- randomgen/src/xoroshiro128/xoroshiro128-test-data-gen.c +76 -0
- randomgen/src/xoroshiro128/xoroshiro128.c +83 -0
- randomgen/src/xoroshiro128/xoroshiro128.h +84 -0
- randomgen/src/xoroshiro128/xoroshiro128plus.orig.c +102 -0
- randomgen/src/xoroshiro128/xoroshiro128plus.orig.h +5 -0
- randomgen/src/xoroshiro128/xoroshiro128plusplus-test-data-gen.c +76 -0
- randomgen/src/xoroshiro128/xoroshiro128plusplus.orig.c +87 -0
- randomgen/src/xorshift1024/LICENSE.md +9 -0
- randomgen/src/xorshift1024/xorshift1024-benchmark.c +35 -0
- randomgen/src/xorshift1024/xorshift1024-test-data-gen.c +98 -0
- randomgen/src/xorshift1024/xorshift1024.c +32 -0
- randomgen/src/xorshift1024/xorshift1024.h +39 -0
- randomgen/src/xorshift1024/xorshift1024.orig.c +68 -0
- randomgen/src/xorshift1024/xorshift1024.orig.h +7 -0
- randomgen/src/xoshiro256/LICENSE.md +9 -0
- randomgen/src/xoshiro256/xoshiro256-benchmark-indirect.c +35 -0
- randomgen/src/xoshiro256/xoshiro256-benchmark.c +135 -0
- randomgen/src/xoshiro256/xoshiro256-test-data-gen.c +71 -0
- randomgen/src/xoshiro256/xoshiro256.c +55 -0
- randomgen/src/xoshiro256/xoshiro256.h +52 -0
- randomgen/src/xoshiro256/xoshiro256.orig.c +103 -0
- randomgen/src/xoshiro256/xoshiro256.orig.h +5 -0
- randomgen/src/xoshiro512/LICENSE.md +9 -0
- randomgen/src/xoshiro512/xoshiro512-test-data-gen.c +79 -0
- randomgen/src/xoshiro512/xoshiro512.c +51 -0
- randomgen/src/xoshiro512/xoshiro512.h +63 -0
- randomgen/src/xoshiro512/xoshiro512.orig.c +67 -0
- randomgen/src/xoshiro512/xoshiro512.orig.h +6 -0
- randomgen/tests/__init__.py +0 -0
- randomgen/tests/_shims.c +11080 -0
- randomgen/tests/_shims.cp313-win_amd64.pyd +0 -0
- randomgen/tests/_shims.pyi +9 -0
- randomgen/tests/_shims.pyx +15 -0
- randomgen/tests/data/__init__.py +0 -0
- randomgen/tests/data/_write_hashes.py +18 -0
- randomgen/tests/data/aesctr-testset-1.csv +1001 -0
- randomgen/tests/data/aesctr-testset-2.csv +1001 -0
- randomgen/tests/data/chacha-testset-1.csv +1001 -0
- randomgen/tests/data/chacha-testset-2.csv +1001 -0
- randomgen/tests/data/compute_hashes.py +260 -0
- randomgen/tests/data/dSFMT-testset-1.csv +1001 -0
- randomgen/tests/data/dSFMT-testset-2.csv +1001 -0
- randomgen/tests/data/efiix64-testset-1.csv +1001 -0
- randomgen/tests/data/efiix64-testset-2.csv +1001 -0
- randomgen/tests/data/hc-128-testset-1.csv +1001 -0
- randomgen/tests/data/hc-128-testset-2.csv +1001 -0
- randomgen/tests/data/jsf32-testset-1.csv +1001 -0
- randomgen/tests/data/jsf32-testset-2.csv +1001 -0
- randomgen/tests/data/jsf64-testset-1.csv +1001 -0
- randomgen/tests/data/jsf64-testset-2.csv +1001 -0
- randomgen/tests/data/lxm-testset-1.csv +1001 -0
- randomgen/tests/data/lxm-testset-2.csv +1001 -0
- randomgen/tests/data/mt19937-testset-1.csv +1001 -0
- randomgen/tests/data/mt19937-testset-2.csv +1001 -0
- randomgen/tests/data/mt64-testset-1.csv +1001 -0
- randomgen/tests/data/mt64-testset-2.csv +1001 -0
- randomgen/tests/data/pcg32-testset-1.csv +1001 -0
- randomgen/tests/data/pcg32-testset-2.csv +1001 -0
- randomgen/tests/data/pcg64-cm-dxsm-testset-1.csv +1001 -0
- randomgen/tests/data/pcg64-cm-dxsm-testset-2.csv +1001 -0
- randomgen/tests/data/pcg64-cm-xsl_rr-testset-1.csv +1000 -0
- randomgen/tests/data/pcg64-cm-xsl_rr-testset-2.csv +1001 -0
- randomgen/tests/data/pcg64-dxsm-testset-1.csv +1001 -0
- randomgen/tests/data/pcg64-dxsm-testset-2.csv +1001 -0
- randomgen/tests/data/pcg64-testset-1.csv +1001 -0
- randomgen/tests/data/pcg64-testset-2.csv +1001 -0
- randomgen/tests/data/pcg64-xsl_rr-testset-1.csv +1001 -0
- randomgen/tests/data/pcg64-xsl_rr-testset-2.csv +1001 -0
- randomgen/tests/data/philox-testset-1.csv +1001 -0
- randomgen/tests/data/philox-testset-2.csv +1001 -0
- randomgen/tests/data/philox4x32-testset-1.csv +1001 -0
- randomgen/tests/data/philox4x32-testset-2.csv +1001 -0
- randomgen/tests/data/romuquad-testset-1.csv +1001 -0
- randomgen/tests/data/romuquad-testset-2.csv +1001 -0
- randomgen/tests/data/romutrio-testset-1.csv +1001 -0
- randomgen/tests/data/romutrio-testset-2.csv +1001 -0
- randomgen/tests/data/sfc-testset-1.csv +1001 -0
- randomgen/tests/data/sfc-testset-2.csv +1001 -0
- randomgen/tests/data/sfmt-testset-1.csv +1001 -0
- randomgen/tests/data/sfmt-testset-2.csv +1001 -0
- randomgen/tests/data/speck-128-testset-1.csv +1001 -0
- randomgen/tests/data/speck-128-testset-2.csv +1001 -0
- randomgen/tests/data/stability_results.py +1729 -0
- randomgen/tests/data/stable_hashes.py +3941 -0
- randomgen/tests/data/threefry-testset-1.csv +1001 -0
- randomgen/tests/data/threefry-testset-2.csv +1001 -0
- randomgen/tests/data/threefry32-testset-1.csv +1001 -0
- randomgen/tests/data/threefry32-testset-2.csv +1001 -0
- randomgen/tests/data/xoroshiro128-testset-1.csv +1001 -0
- randomgen/tests/data/xoroshiro128-testset-2.csv +1001 -0
- randomgen/tests/data/xoroshiro128plusplus-testset-1.csv +1001 -0
- randomgen/tests/data/xoroshiro128plusplus-testset-2.csv +1001 -0
- randomgen/tests/data/xorshift1024-testset-1.csv +1001 -0
- randomgen/tests/data/xorshift1024-testset-2.csv +1001 -0
- randomgen/tests/data/xoshiro256-testset-1.csv +1001 -0
- randomgen/tests/data/xoshiro256-testset-2.csv +1001 -0
- randomgen/tests/data/xoshiro512-testset-1.csv +1001 -0
- randomgen/tests/data/xoshiro512-testset-2.csv +1001 -0
- randomgen/tests/test_bit_generators_against_numpy.py +45 -0
- randomgen/tests/test_common.py +81 -0
- randomgen/tests/test_direct.py +2036 -0
- randomgen/tests/test_extended_generator.py +717 -0
- randomgen/tests/test_final_release_changes.py +43 -0
- randomgen/tests/test_generator_mt19937.py +78 -0
- randomgen/tests/test_lcg128mix_pcg64dxsm.py +214 -0
- randomgen/tests/test_seed_sequence.py +229 -0
- randomgen/tests/test_sfc.py +54 -0
- randomgen/tests/test_smoke.py +1392 -0
- randomgen/tests/test_stability.py +260 -0
- randomgen/tests/test_wrapper.py +119 -0
- randomgen/tests/test_wrapper_numba.py +233 -0
- randomgen/threefry.c +19055 -0
- randomgen/threefry.cp313-win_amd64.pyd +0 -0
- randomgen/threefry.pxd +103 -0
- randomgen/threefry.pxd.in +68 -0
- randomgen/threefry.pyi +33 -0
- randomgen/threefry.pyx +537 -0
- randomgen/typing.py +13 -0
- randomgen/wrapper.c +19279 -0
- randomgen/wrapper.cp313-win_amd64.pyd +0 -0
- randomgen/wrapper.pyi +46 -0
- randomgen/wrapper.pyx +329 -0
- randomgen/xoroshiro128.c +15815 -0
- randomgen/xoroshiro128.cp313-win_amd64.pyd +0 -0
- randomgen/xoroshiro128.pxd +28 -0
- randomgen/xoroshiro128.pyi +20 -0
- randomgen/xoroshiro128.pyx +306 -0
- randomgen/xorshift1024.c +15508 -0
- randomgen/xorshift1024.cp313-win_amd64.pyd +0 -0
- randomgen/xorshift1024.pxd +23 -0
- randomgen/xorshift1024.pyi +20 -0
- randomgen/xorshift1024.pyx +277 -0
- randomgen/xoshiro256.c +15557 -0
- randomgen/xoshiro256.cp313-win_amd64.pyd +0 -0
- randomgen/xoshiro256.pxd +22 -0
- randomgen/xoshiro256.pyi +16 -0
- randomgen/xoshiro256.pyx +280 -0
- randomgen/xoshiro512.c +15490 -0
- randomgen/xoshiro512.cp313-win_amd64.pyd +0 -0
- randomgen/xoshiro512.pxd +22 -0
- randomgen/xoshiro512.pyi +16 -0
- randomgen/xoshiro512.pyx +274 -0
- randomgen-2.0.1.dist-info/LICENSE.md +108 -0
- randomgen-2.0.1.dist-info/METADATA +220 -0
- randomgen-2.0.1.dist-info/RECORD +474 -0
- randomgen-2.0.1.dist-info/WHEEL +5 -0
- randomgen-2.0.1.dist-info/top_level.txt +1 -0
randomgen/__init__.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from randomgen._register import BitGenerators
|
|
7
|
+
from randomgen.aes import AESCounter
|
|
8
|
+
from randomgen.chacha import ChaCha
|
|
9
|
+
from randomgen.dsfmt import DSFMT
|
|
10
|
+
from randomgen.efiix64 import EFIIX64
|
|
11
|
+
from randomgen.entropy import random_entropy
|
|
12
|
+
from randomgen.generator import ExtendedGenerator
|
|
13
|
+
from randomgen.hc128 import HC128
|
|
14
|
+
from randomgen.jsf import JSF
|
|
15
|
+
from randomgen.lxm import LXM
|
|
16
|
+
from randomgen.mt64 import MT64
|
|
17
|
+
from randomgen.mt19937 import MT19937
|
|
18
|
+
from randomgen.pcg32 import PCG32
|
|
19
|
+
from randomgen.pcg64 import PCG64, PCG64DXSM, LCG128Mix
|
|
20
|
+
from randomgen.philox import Philox
|
|
21
|
+
from randomgen.rdrand import RDRAND
|
|
22
|
+
from randomgen.romu import Romu
|
|
23
|
+
from randomgen.seed_sequence import SeedlessSeedSequence, SeedSequence
|
|
24
|
+
from randomgen.sfc import SFC64
|
|
25
|
+
from randomgen.sfmt import SFMT
|
|
26
|
+
from randomgen.speck128 import SPECK128
|
|
27
|
+
from randomgen.threefry import ThreeFry
|
|
28
|
+
from randomgen.wrapper import UserBitGenerator
|
|
29
|
+
from randomgen.xoroshiro128 import Xoroshiro128
|
|
30
|
+
from randomgen.xorshift1024 import Xorshift1024
|
|
31
|
+
from randomgen.xoshiro256 import Xoshiro256
|
|
32
|
+
from randomgen.xoshiro512 import Xoshiro512
|
|
33
|
+
|
|
34
|
+
from ._version import version as __version__, version_tuple as __version_info__
|
|
35
|
+
|
|
36
|
+
PKG = os.path.join(os.path.dirname(__file__))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"AESCounter",
|
|
41
|
+
"BitGenerators",
|
|
42
|
+
"ChaCha",
|
|
43
|
+
"DSFMT",
|
|
44
|
+
"EFIIX64",
|
|
45
|
+
"ExtendedGenerator",
|
|
46
|
+
"HC128",
|
|
47
|
+
"JSF",
|
|
48
|
+
"LCG128Mix",
|
|
49
|
+
"LXM",
|
|
50
|
+
"MT19937",
|
|
51
|
+
"MT64",
|
|
52
|
+
"PCG32",
|
|
53
|
+
"PCG64",
|
|
54
|
+
"PCG64DXSM",
|
|
55
|
+
"Philox",
|
|
56
|
+
"RDRAND",
|
|
57
|
+
"Romu",
|
|
58
|
+
"SFC64",
|
|
59
|
+
"SFMT",
|
|
60
|
+
"SPECK128",
|
|
61
|
+
"SeedSequence",
|
|
62
|
+
"SeedlessSeedSequence",
|
|
63
|
+
"ThreeFry",
|
|
64
|
+
"UserBitGenerator",
|
|
65
|
+
"Xoroshiro128",
|
|
66
|
+
"Xorshift1024",
|
|
67
|
+
"Xoshiro256",
|
|
68
|
+
"Xoshiro512",
|
|
69
|
+
"random_entropy",
|
|
70
|
+
"__version__",
|
|
71
|
+
"__version_info__",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def test(extra_args: str | list[str] | None = None) -> None:
|
|
76
|
+
try:
|
|
77
|
+
import pytest
|
|
78
|
+
except ImportError as err:
|
|
79
|
+
raise ImportError("Need pytest>=5.0.1 to run tests") from err
|
|
80
|
+
cmd = ["--skip-slow"]
|
|
81
|
+
if extra_args:
|
|
82
|
+
if not isinstance(extra_args, list):
|
|
83
|
+
extra_args = [extra_args]
|
|
84
|
+
assert isinstance(extra_args, list)
|
|
85
|
+
cmd = extra_args
|
|
86
|
+
cmd += [PKG]
|
|
87
|
+
joined = " ".join(cmd)
|
|
88
|
+
print(f"running: pytest {joined}")
|
|
89
|
+
sys.exit(pytest.main(cmd))
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class _DeprecatedValueType:
|
|
2
|
+
"""Special keyword value for deprecated arguments..
|
|
3
|
+
|
|
4
|
+
The instance of this class may be used as the default value assigned to a
|
|
5
|
+
keyword if the parameter is deprecated.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__instance = None
|
|
9
|
+
|
|
10
|
+
def __new__(cls):
|
|
11
|
+
# ensure that only one instance exists
|
|
12
|
+
if not cls.__instance:
|
|
13
|
+
cls.__instance = super().__new__(cls)
|
|
14
|
+
return cls.__instance
|
|
15
|
+
|
|
16
|
+
def __repr__(self):
|
|
17
|
+
return "<deprecated>"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
_DeprecatedValue = _DeprecatedValueType()
|
|
21
|
+
|
|
22
|
+
__all__ = ["_DeprecatedValue"]
|
randomgen/_pickle.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
from randomgen.aes import AESCounter
|
|
6
|
+
from randomgen.chacha import ChaCha
|
|
7
|
+
from randomgen.common import BitGenerator
|
|
8
|
+
from randomgen.dsfmt import DSFMT
|
|
9
|
+
from randomgen.efiix64 import EFIIX64
|
|
10
|
+
from randomgen.generator import ExtendedGenerator
|
|
11
|
+
from randomgen.hc128 import HC128
|
|
12
|
+
from randomgen.jsf import JSF
|
|
13
|
+
from randomgen.lxm import LXM
|
|
14
|
+
from randomgen.mt64 import MT64
|
|
15
|
+
from randomgen.mt19937 import MT19937
|
|
16
|
+
from randomgen.pcg32 import PCG32
|
|
17
|
+
from randomgen.pcg64 import PCG64, PCG64DXSM, LCG128Mix
|
|
18
|
+
from randomgen.philox import Philox
|
|
19
|
+
from randomgen.rdrand import RDRAND
|
|
20
|
+
from randomgen.romu import Romu
|
|
21
|
+
from randomgen.sfc import SFC64
|
|
22
|
+
from randomgen.sfmt import SFMT
|
|
23
|
+
from randomgen.speck128 import SPECK128
|
|
24
|
+
from randomgen.threefry import ThreeFry
|
|
25
|
+
from randomgen.xoroshiro128 import Xoroshiro128
|
|
26
|
+
from randomgen.xorshift1024 import Xorshift1024
|
|
27
|
+
from randomgen.xoshiro256 import Xoshiro256
|
|
28
|
+
from randomgen.xoshiro512 import Xoshiro512
|
|
29
|
+
|
|
30
|
+
BitGenerators: dict[str, type[BitGenerator]] = {
|
|
31
|
+
"AESCounter": AESCounter,
|
|
32
|
+
"ChaCha": ChaCha,
|
|
33
|
+
"LCG128Mix": LCG128Mix,
|
|
34
|
+
"DSFMT": DSFMT,
|
|
35
|
+
"EFIIX64": EFIIX64,
|
|
36
|
+
"HC128": HC128,
|
|
37
|
+
"JSF": JSF,
|
|
38
|
+
"LXM": LXM,
|
|
39
|
+
"MT19937": MT19937,
|
|
40
|
+
"MT64": MT64,
|
|
41
|
+
"PCG32": PCG32,
|
|
42
|
+
"PCG64": PCG64,
|
|
43
|
+
"PCG64DXSM": PCG64DXSM,
|
|
44
|
+
"Philox": Philox,
|
|
45
|
+
"Romu": Romu,
|
|
46
|
+
"ThreeFry": ThreeFry,
|
|
47
|
+
"Xorshift1024": Xorshift1024,
|
|
48
|
+
"Xoroshiro128": Xoroshiro128,
|
|
49
|
+
"Xoshiro256": Xoshiro256,
|
|
50
|
+
"Xoshiro512": Xoshiro512,
|
|
51
|
+
"SPECK128": SPECK128,
|
|
52
|
+
"SFC64": SFC64,
|
|
53
|
+
"SFMT": SFMT,
|
|
54
|
+
"RDRAND": RDRAND,
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# Assign the fully qualified name for future proofness
|
|
58
|
+
for value in list(BitGenerators.values()):
|
|
59
|
+
BitGenerators[f"{value.__module__}.{value.__name__}"] = value
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _get_bitgenerator(bit_generator_name: str) -> type[BitGenerator]:
|
|
63
|
+
"""
|
|
64
|
+
Bit generator look-up with user-friendly errors
|
|
65
|
+
"""
|
|
66
|
+
if bit_generator_name in BitGenerators:
|
|
67
|
+
bit_generator = BitGenerators[bit_generator_name]
|
|
68
|
+
else:
|
|
69
|
+
raise ValueError(
|
|
70
|
+
str(bit_generator_name) + " is not a known BitGenerator module."
|
|
71
|
+
)
|
|
72
|
+
return bit_generator
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _decode(name: str | bytes) -> str:
|
|
76
|
+
if isinstance(name, str):
|
|
77
|
+
return name
|
|
78
|
+
assert isinstance(name, bytes)
|
|
79
|
+
return name.decode("ascii")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def __extended_generator_ctor(
|
|
83
|
+
bit_generator_name: str | bytes = "MT19937",
|
|
84
|
+
) -> ExtendedGenerator:
|
|
85
|
+
"""
|
|
86
|
+
Pickling helper function that returns a Generator object
|
|
87
|
+
|
|
88
|
+
Parameters
|
|
89
|
+
----------
|
|
90
|
+
bit_generator_name: str
|
|
91
|
+
String containing the core BitGenerator
|
|
92
|
+
|
|
93
|
+
Returns
|
|
94
|
+
-------
|
|
95
|
+
rg: Generator
|
|
96
|
+
Generator using the named core BitGenerator
|
|
97
|
+
"""
|
|
98
|
+
bit_generator_name = _decode(bit_generator_name)
|
|
99
|
+
assert isinstance(bit_generator_name, str)
|
|
100
|
+
bit_generator = _get_bitgenerator(bit_generator_name)
|
|
101
|
+
with warnings.catch_warnings():
|
|
102
|
+
warnings.filterwarnings("ignore", category=FutureWarning)
|
|
103
|
+
bit_gen = bit_generator()
|
|
104
|
+
return ExtendedGenerator(bit_gen)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def __bit_generator_ctor(bit_generator_name: str | bytes = "MT19937") -> BitGenerator:
|
|
108
|
+
"""
|
|
109
|
+
Pickling helper function that returns a bit generator object
|
|
110
|
+
|
|
111
|
+
Parameters
|
|
112
|
+
----------
|
|
113
|
+
bit_generator_name: str
|
|
114
|
+
String containing the name of the bit generator
|
|
115
|
+
|
|
116
|
+
Returns
|
|
117
|
+
-------
|
|
118
|
+
bit_generator: BitGenerator
|
|
119
|
+
Bit generator instance
|
|
120
|
+
"""
|
|
121
|
+
bit_generator_name = _decode(bit_generator_name)
|
|
122
|
+
assert isinstance(bit_generator_name, str)
|
|
123
|
+
bit_generator = _get_bitgenerator(bit_generator_name)
|
|
124
|
+
with warnings.catch_warnings():
|
|
125
|
+
warnings.filterwarnings("ignore", category=FutureWarning)
|
|
126
|
+
bit_gen = bit_generator()
|
|
127
|
+
return bit_gen
|
randomgen/_register.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from numpy.random._pickle import BitGenerators
|
|
2
|
+
|
|
3
|
+
from randomgen.aes import AESCounter
|
|
4
|
+
from randomgen.chacha import ChaCha
|
|
5
|
+
from randomgen.dsfmt import DSFMT
|
|
6
|
+
from randomgen.efiix64 import EFIIX64
|
|
7
|
+
from randomgen.hc128 import HC128
|
|
8
|
+
from randomgen.jsf import JSF
|
|
9
|
+
from randomgen.lxm import LXM
|
|
10
|
+
from randomgen.mt64 import MT64
|
|
11
|
+
from randomgen.mt19937 import MT19937
|
|
12
|
+
from randomgen.pcg32 import PCG32
|
|
13
|
+
from randomgen.pcg64 import PCG64, PCG64DXSM, LCG128Mix
|
|
14
|
+
from randomgen.philox import Philox
|
|
15
|
+
from randomgen.rdrand import RDRAND
|
|
16
|
+
from randomgen.romu import Romu
|
|
17
|
+
from randomgen.sfc import SFC64
|
|
18
|
+
from randomgen.sfmt import SFMT
|
|
19
|
+
from randomgen.speck128 import SPECK128
|
|
20
|
+
from randomgen.threefry import ThreeFry
|
|
21
|
+
from randomgen.wrapper import UserBitGenerator
|
|
22
|
+
from randomgen.xoroshiro128 import Xoroshiro128
|
|
23
|
+
from randomgen.xorshift1024 import Xorshift1024
|
|
24
|
+
from randomgen.xoshiro256 import Xoshiro256
|
|
25
|
+
from randomgen.xoshiro512 import Xoshiro512
|
|
26
|
+
|
|
27
|
+
bit_generators = [
|
|
28
|
+
AESCounter,
|
|
29
|
+
ChaCha,
|
|
30
|
+
DSFMT,
|
|
31
|
+
EFIIX64,
|
|
32
|
+
HC128,
|
|
33
|
+
JSF,
|
|
34
|
+
LXM,
|
|
35
|
+
MT19937,
|
|
36
|
+
MT64,
|
|
37
|
+
PCG32,
|
|
38
|
+
PCG64,
|
|
39
|
+
PCG64DXSM,
|
|
40
|
+
LCG128Mix,
|
|
41
|
+
Philox,
|
|
42
|
+
RDRAND,
|
|
43
|
+
Romu,
|
|
44
|
+
SFC64,
|
|
45
|
+
SFMT,
|
|
46
|
+
SPECK128,
|
|
47
|
+
ThreeFry,
|
|
48
|
+
UserBitGenerator,
|
|
49
|
+
Xoroshiro128,
|
|
50
|
+
Xorshift1024,
|
|
51
|
+
Xoshiro256,
|
|
52
|
+
Xoshiro512,
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
for bitgen in bit_generators:
|
|
56
|
+
key = f"{bitgen.__name__}"
|
|
57
|
+
if key not in BitGenerators:
|
|
58
|
+
BitGenerators[key] = bitgen
|
|
59
|
+
full_key = f"{bitgen.__module__}.{bitgen.__name__}"
|
|
60
|
+
BitGenerators[full_key] = bitgen
|
|
61
|
+
|
|
62
|
+
__all__ = ["BitGenerators"]
|