From: Francois Fleuret Date: Fri, 16 Jun 2017 07:43:16 +0000 (+0200) Subject: Added svrt.seed(long). X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=pysvrt.git;a=commitdiff_plain;h=7e8301516e75c43d20c37b0392953aa7f9ca00e0 Added svrt.seed(long). --- 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);