Metadata-Version: 2.4
Name: seqbuild
Version: 0.0.72
Summary: A collection of algorithms for pseudo-random number generation.
Home-page: https://github.com/Changissnz/seqbuild
Author: Richard Pham
Author-email: Richard Pham <phamrichard45@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/changissnz/seqbuild
Project-URL: Issues, https://github.com/changissnz/seqbuild/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy>=1.22.1
Requires-Dist: matplotlib>=3.5.3
Requires-Dist: scipy>=1.14.1
Requires-Dist: morebs2>=0.1.99
Requires-Dist: python-resources>=0.3
Dynamic: author
Dynamic: home-page
Dynamic: license-file

# About: Seqbuild

Go to the Github project, [seqbuild](https://www.github.com/changissnz/seqbuild) 
for more information. 

# Basic Usage 

After installation, the below script would load up the user interface. 

```
from seqbuild.face import sb_ui

sb_ui.run_sb_app() 
```

Inside the interface, there is a HELP button. Additionally, for any term T of  
question, submit  

```
help T. 
```

for more details.  

There is also a convenient way to auto-generate Comm Lang files, which can then be 
loaded up into the user interface through the `sb_ui.run_sb_app()` command, or used 
for other purposes.  

```
from face.easy_gen_struct import * 

filepath = "Your_Comm_Lang_filepath.txt"
base_gen_name = "name"
use_prng_for_prng_pr = 0.5

vector_files = ["your_vector_files.txt"]
cl_files = ["other_Comm_Lang_files_you_want_to_load_up.txt"]
consistent_PRNG_output = True | False 

cauto = TimeBasedCommLangFileGenerator(filepath,base_gen_name,\
    use_prng_for_prng_pr,vector_files,cl_files,consistent_PRNG_output)  
cauto.generate()
```

Last but not least, the `TimeBasedCommLangFileGenerator` can also be used to generate single 
PRNGs, from the list of PRNGs in the next section. 

```
from face.easy_gen_struct import * 

S = one_T_random_struct("prng_name")
```

### PRNG Categories in Comm Lang 

Here is a list of PRNGs and their categories available for use in Comm Lang.  

- Class 0: LCGs and LCG form-fitters  
    - `lcg`, `lcgv2`, `lcgv3`, `mdrgen`  
- Class 1: linear combination and polynomial-based  
    - `rch`, `idforest`, `udls` 
- Class I: identity  
    - `echo`  
- Class 2: multi-factored form-fitters with noise adders  
    - `ssino`, `gg`, `shadow`  
- Class T: time-based (or 'real number exploder`)     
    - `pdd`  
- Class D: differentials of form-fitters b/t two-dimensional points  
    - `fit22`, `lps`  
- Class 3: stacked vector-based form-fitters with noise adders  
    - `n2m`, `afs`  
- Class O: operation-based  
    - `optri`, `cshift`, `pmulti` 
- Class V: quotient and polynomial differential form-fitters of vector inputs  
    - `qval`, `pid`. 

### Statistical Tests for Randomness 

In `seqbuild`, there are two primary tests to measure randomness of PRNGs: `QUALTEST` 
and `CHAINTEST`. The simplified usage of these two tests, besides from being commands in 
the Comm Lang user interface, is done through `file<face.prng_stats>`. Here is an example. 

```
from face.prng_stats import * 

G = "your PRNG" 
ngram_info = "relatively small positive intiger or intigers" 
partition_size = "relatively small positive intiger" 

S = PRNGStats(G,ngram_info,partition_size)
S.run() 

q,c = S.latest_results()

print("QUALTEST SCORE")
print(q) 

print("CHAINTEST SCORE")
print(c) 
```

There are also input PRNG/output PRNG comparators in that file. 

# Disclaimer 

The `class<TimeBasedCommLangFileGenerator>` is still in Alpha development. At some timestamps, the 
generated Comm Lang file may fail certain randomness measures.  


# Third-Party Python Libraries 

numpy>=1.22.1
matplotlib>=3.5.3
scipy>=1.14.1
morebs2>=0.1.72
python-resources>=0.3
