]> www.ginac.de Git - cln.git/blobdiff - src/integer/random/cl_I_random.cc
Finalize CLN 1.3.7 release.
[cln.git] / src / integer / random / cl_I_random.cc
index 36c4f42138de678220a87b6ca5997303c646b8dd..aabc640bad698c2303bfce5525ecc524bbb983d5 100644 (file)
@@ -1,25 +1,27 @@
 // random_I().
 
 // General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
 
 // Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
 
 
 // Implementation.
 
-#include "cl_random_impl.h"
-#include "cl_I.h"
-#include "cl_DS.h"
+#include "base/random/cl_random_impl.h"
+#include "integer/cl_I.h"
+#include "base/digitseq/cl_DS.h"
 
-const cl_I random_I (cl_random_state& randomstate, const cl_I& n)
+namespace cln {
+
+const cl_I random_I (random_state& randomstate, const cl_I& n)
 {
        CL_ALLOCA_STACK;
        var const uintD* n_MSDptr;
        var uintC n_len;
        var const uintD* n_LSDptr;
-       I_to_NDS_nocopy(n, n_MSDptr=,n_len=,n_LSDptr=,cl_false,); // Digit sequence >0 zu n
+       I_to_NDS_nocopy(n, n_MSDptr=,n_len=,n_LSDptr=,false,); // Digit sequence >0 zu n
        var uintD* MSDptr;
        var uintC len = n_len + ceiling(16,intDsize); // 16 Bits mehr
        // neue UDS mit len Zufallsdigits bilden:
@@ -32,3 +34,5 @@ const cl_I random_I (cl_random_state& randomstate, const cl_I& n)
        // Rest in Integer umwandeln:
        return NUDS_to_I(r.MSDptr,r.len);
 }
+
+}  // namespace cln