diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2015-07-30 16:13:23 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2015-07-30 16:13:23 +0200 |
| commit | e0e37a5b765d5ba614355c9b0c37bf048ce501ef (patch) | |
| tree | 87fc2d030c681afaae8eb0c33bb621c43635bb93 /README.md | |
| parent | name change to SyncRNG and documentation in the .c file (diff) | |
| download | SyncRNG-e0e37a5b765d5ba614355c9b0c37bf048ce501ef.tar.gz SyncRNG-e0e37a5b765d5ba614355c9b0c37bf048ce501ef.zip | |
readme formatting
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -27,21 +27,25 @@ build both shared libraries using: Then, in a Python script located in the same directory as `syncrng.so` and `SyncRNG.py`, you can do: - from pysyncrng import SyncRNG - - s = SyncRNG(seed=123456) - for i in range(10): - print(s.randi()) +```python +from SyncRNG import SyncRNG + +s = SyncRNG(seed=123456) +for i in range(10): + print(s.randi()) +``` Similarly, in an R script located in the same directory as `RSyncRNG.so` and `SyncRNG.R`, you can do: - source('./SyncRNG.R') - - s = SyncRNG(seed=123456) - for (i in 1:10) { +```R +source('./SyncRNG.R') + +s = SyncRNG(seed=123456) +for (i in 1:10) { cat(s$randi(), '\n') - } +} +``` You'll notice that the random numbers are indeed the same. |
