aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2015-08-06 13:07:32 +0200
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2015-08-06 13:07:32 +0200
commit4fc568eb07548bd5d08bfefbfd84472af4b062ee (patch)
treef6497cefe0ddbd83823ee9850a631dfbaddf6385 /README.md
parentadded Python 3 support (diff)
downloadSyncRNG-4fc568eb07548bd5d08bfefbfd84472af4b062ee.tar.gz
SyncRNG-4fc568eb07548bd5d08bfefbfd84472af4b062ee.zip
update readme, bump version to 1.0, store first 1000 for future reference
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 15 insertions, 11 deletions
diff --git a/README.md b/README.md
index 2e70f8b..b222cfb 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,8 @@ be the same in both languages, provided the same seed is used.
How
---
-First install the packages as stated under Installation. Then, in a Python
-script located in the same directory as `syncrng.so` and `SyncRNG.py`, you can
-do:
+First install the packages as stated under Installation. Then, in Python you
+can do:
```python
from SyncRNG import SyncRNG
@@ -30,8 +29,7 @@ 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:
+Similarly, after installing the R library you can do in R:
```R
library(SyncRNG)
@@ -66,14 +64,20 @@ or system-wide through:
sudo python setup.py install
```
-Notes
+Usage
-----
-The random numbers are uniformly distributed on `[0, 2^32 - 1]`.
+In both R and Python the following methods are available for the `SyncRNG`
+class:
+1. `randi()`: generate a random integer on the interval [0, 2^32).
+2. `rand()`: generate a random floating point number on the interval [0.0,
+ 1.0)
+3. `randbelow(n)`: generate a random integer below a given integer `n`.
+4. `shuffle(x)`: generate a permutation of a given list of numbers `x`.
-TODO
-----
+Notes
+-----
+
+The random numbers are uniformly distributed on `[0, 2^32 - 1]`.
-It may be easier to provide system-wide installation through an R package and
-a Python module.