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
48f11679
Unverified
Commit
48f11679
authored
Feb 12, 2022
by
Juha Reunanen
Committed by
GitHub
Feb 12, 2022
Browse files
Do not use deprecated `std::random_shuffle` (#2507)
parent
d665bfb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dlib/test/statistics.cpp
dlib/test/statistics.cpp
+4
-1
No files found.
dlib/test/statistics.cpp
View file @
48f11679
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <algorithm>
#include <algorithm>
#include <dlib/matrix.h>
#include <dlib/matrix.h>
#include <cmath>
#include <cmath>
#include <random>
#include "tester.h"
#include "tester.h"
...
@@ -404,6 +405,8 @@ namespace
...
@@ -404,6 +405,8 @@ namespace
string
str
=
"DlibRocks"
;
string
str
=
"DlibRocks"
;
std
::
minstd_rand
shuffle_random
;
for
(
int
j
=
0
;
j
<
5
;
j
++
)
for
(
int
j
=
0
;
j
<
5
;
j
++
)
{
{
matrix
<
double
,
1
,
100000
>
dat
;
matrix
<
double
,
1
,
100000
>
dat
;
...
@@ -422,7 +425,7 @@ namespace
...
@@ -422,7 +425,7 @@ namespace
double
exkurdenom
=
0
;
double
exkurdenom
=
0
;
double
unbi_exkur
=
0
;
double
unbi_exkur
=
0
;
random_
shuffle
(
str
.
begin
(),
str
.
end
());
std
::
shuffle
(
str
.
begin
(),
str
.
end
()
,
shuffle_random
);
rnum
.
set_seed
(
str
);
rnum
.
set_seed
(
str
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
for
(
int
i
=
0
;
i
<
n
;
i
++
)
...
...
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