Added svrt.seed(long).
[pysvrt.git] / svrt.c
diff --git a/svrt.c b/svrt.c
index 102084b..d1341b6 100644 (file)
--- 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;