Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
1b1cf754
Commit
1b1cf754
authored
Nov 04, 2012
by
Davis King
Browse files
Added rand::get_random_64bit_number().
parent
0f88b396
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
dlib/rand/rand_kernel_1.h
dlib/rand/rand_kernel_1.h
+8
-0
dlib/rand/rand_kernel_abstract.h
dlib/rand/rand_kernel_abstract.h
+7
-0
No files found.
dlib/rand/rand_kernel_1.h
View file @
1b1cf754
...
@@ -123,6 +123,14 @@ namespace dlib
...
@@ -123,6 +123,14 @@ namespace dlib
return
mt
();
return
mt
();
}
}
inline
uint64
get_random_64bit_number
(
)
{
const
uint64
a
=
get_random_32bit_number
();
const
uint64
b
=
get_random_32bit_number
();
return
(
a
<<
32
)
|
b
;
}
double
get_random_double
(
double
get_random_double
(
)
)
{
{
...
...
dlib/rand/rand_kernel_abstract.h
View file @
1b1cf754
...
@@ -88,6 +88,13 @@ namespace dlib
...
@@ -88,6 +88,13 @@ namespace dlib
- returns a pseudorandom number in the range 0 to 2^32-1
- returns a pseudorandom number in the range 0 to 2^32-1
!*/
!*/
uint64
get_random_64bit_number
(
);
/*!
ensures
- returns a pseudorandom number in the range 0 to 2^64-1
!*/
float
get_random_float
(
float
get_random_float
(
);
);
/*!
/*!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment