From 7e8301516e75c43d20c37b0392953aa7f9ca00e0 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 16 Jun 2017 09:43:16 +0200 Subject: [PATCH] Added svrt.seed(long). --- svrt.c | 4 ++++ svrt.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/svrt.c b/svrt.c index 102084b..d1341b6 100644 --- a/svrt.c +++ b/svrt.c @@ -86,6 +86,10 @@ THByteStorage *uncompress(THByteStorage *x) { return result; } +void seed(long s) { + srand48(s); +} + THByteTensor *generate_vignettes(long n_problem, THLongTensor *labels) { struct VignetteSet vs; long nb_vignettes; diff --git a/svrt.h b/svrt.h index 94020c4..ff77fb9 100644 --- a/svrt.h +++ b/svrt.h @@ -27,4 +27,6 @@ THByteStorage *compress(THByteStorage *x); THByteStorage *uncompress(THByteStorage *x); +void seed(long s); + THByteTensor *generate_vignettes(long n_problem, THLongTensor *labels); -- 2.20.1