GithubHelp home page GithubHelp logo

chriseaton / gopractrand Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 1.79 MB

A library that provides and tests random-number-generators (RNG) and random-data testing tools written in Go, powered by the public-domain PractRand testing suite (C++).

License: Other

Shell 0.01% Go 8.77% C++ 90.34% C 0.06% SWIG 0.75% Makefile 0.07%
rng random random-number-generators random-testing go golang golang-library practrand

gopractrand's Introduction

GoPractRand

This library provides a Go(lang) API wrapper to the well-established and public domain PractRand library which can be used for testing random number generators and randomized datasets.

The primary goal is to provide stable Go-accessible APIs to all tests and random number generators (RNGs) provided in PractRand with minimal modification to the original source library code.

In addition, the main package will provide access to a Test Manager and command-line interface.

OS Support

Currently this library has only been tested on CentOS 8 Linux, but I suspect it will likely work on other distros without issue.

Had success compiling on other distro's or operating systems? Drop me a message and let me know, or submit a PR if you had to make adjustments.

Windows support will come in a future release.

Mac support will need to be provided via PR if someone would like to contribute.

Building

To utilize this Go package you will need to build and install the PractRand library provided in this repository.

A Makefile is provided to facilitate the build and install process in the practrand/ directory.

cd practrand
make
sudo make install

This will build and install the libpractrand.so shared library and rng_test, rng_benchmark, rng_output command-line tools system-wide.

Running

To run one of the go library files directly using the built practrand library, run:

go run main.go 

Goals for v-0.1.0

Complete buildable generated APIs for all RNGs:

  • arbee
  • chacha
  • efiix8x384
  • efiix8x48
  • efiix16x384
  • efiix16x48
  • efiix32x384
  • efiix32x48
  • efiix64x384
  • efiix64x48
  • hc256
  • isaac32x256
  • isaac64x256
  • jsf32
  • jsf64
  • mt19937
  • rarns16
  • rarns32
  • rarns64
  • salsa
  • sfc16
  • sfc32
  • sfc64
  • sha2_based_pool
  • trivium
  • xsm32
  • xsm64

Future Goals

  • Test Manager struct to facilitate testing samples.
  • Test Manager CLI.
  • Complete buildable generated APIs for all Tests:
    • BCFN
    • BCFN_MT
    • Birthday
    • BRank
    • coup16
    • CoupGap
    • DistC6
    • DistFreq4
    • FPF
    • FPMulti
    • Gap16
    • mod3
    • NearSeq
    • Pat5
    • transforms

Developing

This package is built with Go unit tests in all packages. Run go test to run the tests in hhe current package directory.

Go Wrapper

The Go wrapper for PractRand is provided through a swig generated layer. If you would like to regenerate the Go wrapper code from the library, run the regenerate.sh script.

gopractrand's People

Contributors

chriseaton avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.