diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2015-07-31 16:21:25 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2015-07-31 16:21:25 +0200 |
| commit | 2971238c8957df1bce0629c12d8c209b39328590 (patch) | |
| tree | 5c84f9bede77ea23d6bc3467cbb82e619feb85ac /test.R | |
| parent | more reliable way to import SyncRNG from R (diff) | |
| download | SyncRNG-2971238c8957df1bce0629c12d8c209b39328590.tar.gz SyncRNG-2971238c8957df1bce0629c12d8c209b39328590.zip | |
reformat to proper python and R packages
Diffstat (limited to 'test.R')
| -rw-r--r-- | test.R | 44 |
1 files changed, 0 insertions, 44 deletions
@@ -1,44 +0,0 @@ - -source('./SyncRNG.R') - -test.randi <- function() -{ - s <- SyncRNG(seed=123456) - for (i in 1:5) - cat(s$randi(), '\n') -} - -test.rand <- function() -{ - s <- SyncRNG(seed=123456) - for (i in 1:5) - cat(s$rand(), '\n') -} - -test.randbelow <- function() -{ - s <- SyncRNG(seed=123456) - for (i in 1:5) - cat(s$randbelow(i), '\n') -} - -test.shuffle <- function() -{ - s <- SyncRNG(seed=123456) - x <- c(1:5) - for (i in 1:5) { - y <- s$shuffle(x) - x <- y - cat(y, '\n') - } -} - -main <- function() -{ - test.randi() - test.rand() - test.randbelow() - test.shuffle() -} - -main() |
