Issue #23: removed std::random_shuffle from tests
authorkhizmax <libcds.dev@gmail.com>
Thu, 9 Apr 2015 19:19:35 +0000 (22:19 +0300)
committerkhizmax <libcds.dev@gmail.com>
Thu, 9 Apr 2015 19:19:35 +0000 (22:19 +0300)
41 files changed:
tests/test-hdr/list/hdr_intrusive_lazy.h
tests/test-hdr/list/hdr_intrusive_michael.h
tests/test-hdr/list/hdr_lazy.h
tests/test-hdr/list/hdr_lazy_kv.h
tests/test-hdr/list/hdr_michael.h
tests/test-hdr/list/hdr_michael_kv.h
tests/test-hdr/map/hdr_cuckoo_map.h
tests/test-hdr/map/hdr_map.h
tests/test-hdr/map/hdr_skiplist_map.h
tests/test-hdr/map/hdr_skiplist_map_rcu.h
tests/test-hdr/map/hdr_striped_map.h
tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h
tests/test-hdr/priority_queue/hdr_pqueue.h
tests/test-hdr/set/hdr_cuckoo_set.h
tests/test-hdr/set/hdr_intrusive_set.h
tests/test-hdr/set/hdr_intrusive_skiplist_set.h
tests/test-hdr/set/hdr_intrusive_skiplist_set_rcu.h
tests/test-hdr/set/hdr_set.h
tests/test-hdr/set/hdr_skiplist_set.h
tests/test-hdr/set/hdr_skiplist_set_rcu.h
tests/test-hdr/set/hdr_striped_set.h
tests/test-hdr/tree/hdr_bronson_avltree_map.h
tests/test-hdr/tree/hdr_ellenbintree_map.h
tests/test-hdr/tree/hdr_ellenbintree_set.h
tests/test-hdr/tree/hdr_intrusive_bintree.h
tests/unit/map2/map_find_int.cpp
tests/unit/map2/map_find_int.h
tests/unit/map2/map_insdel_func.h
tests/unit/map2/map_insdel_int.h
tests/unit/map2/map_insdel_item_int.h
tests/unit/map2/map_insdelfind.cpp
tests/unit/map2/map_insdelfind.h
tests/unit/map2/map_insfind_int.h
tests/unit/pqueue/pop.cpp
tests/unit/pqueue/push.cpp
tests/unit/pqueue/push_pop.cpp
tests/unit/set2/set_delodd.cpp
tests/unit/set2/set_delodd.h
tests/unit/set2/set_insdel_func.h
tests/unit/set2/set_insdelfind.cpp
tests/unit/set2/set_insdelfind.h

index 83615fffc85c2a4fbe54a745689546fdf257679a..802bfbbf0e43c01f4e30c6b8752cf4f8702b0430 100644 (file)
@@ -474,7 +474,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 for (int i = 0; i < nLimit; ++i) {
                     arrItem[i].nKey = a[i];
@@ -567,7 +567,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 for (int i = 0; i < nLimit; ++i) {
                     arrItem[i].nKey = a[i];
index 05248f66d8a59137aa73e0131037ab0fa74ac1d3..c19f07bb2b2ec3d6e38d1b0ee2ec41295fd51f73 100644 (file)
@@ -464,7 +464,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 for (int i = 0; i < nLimit; ++i) {
                     arrItem[i].nKey = a[i];
@@ -563,7 +563,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 for (int i = 0; i < nLimit; ++i) {
                     arrItem[i].nKey = a[i];
index a77ffd7c7b26b79635e9bd23321b9aa774958bfd..84f2554454b3ac4a91f9e87751cf37d2c0bcccb8 100644 (file)
@@ -483,7 +483,7 @@ namespace ordlist {
             int arr[nLimit];
             for ( int i = 0; i < nLimit; i++ )
                 arr[i] = i;
-            std::random_shuffle( arr, arr + nLimit );
+            shuffle( arr, arr + nLimit );
 
             // extract/get
             for ( int i = 0; i < nLimit; ++i )
@@ -574,7 +574,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 // extract/get
                 for ( int i = 0; i < nLimit; ++i )
index c719ac89285a924b7bfd955296de6b105e594185..4752625df3c731275fd69274a07f997704cb6bfe 100644 (file)
@@ -298,7 +298,7 @@ namespace ordlist {
             int arr[nLimit];
             for ( int i = 0; i < nLimit; i++ )
                 arr[i] = i;
-            std::random_shuffle( arr, arr + nLimit );
+            shuffle( arr, arr + nLimit );
 
             // extract/get
             for ( int i = 0; i < nLimit; ++i )
@@ -388,7 +388,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 // extract/get
                 for ( int i = 0; i < nLimit; ++i )
index c37eaa8e0b9a2a0bd3d9d0e26b263c39cc278f33..06a666b1eabe216acf1484cc372f266d007a1b14 100644 (file)
@@ -463,7 +463,7 @@ namespace ordlist {
             int arr[nLimit];
             for ( int i = 0; i < nLimit; i++ )
                 arr[i] = i;
-            std::random_shuffle( arr, arr + nLimit );
+            shuffle( arr, arr + nLimit );
 
             // extract/get
             for ( int i = 0; i < nLimit; ++i )
@@ -553,7 +553,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 // extract/get
                 for ( int i = 0; i < nLimit; ++i )
index 4f467b3175d28d2a4eb361fbba5e5ac79b8d206f..281bddee53ee30ad86a679e7ab537eff1dd6eafa 100644 (file)
@@ -300,7 +300,7 @@ namespace ordlist {
             int arr[nLimit];
             for ( int i = 0; i < nLimit; i++ )
                 arr[i] = i;
-            std::random_shuffle( arr, arr + nLimit );
+            shuffle( arr, arr + nLimit );
 
             // extract/get
             for ( int i = 0; i < nLimit; ++i )
@@ -391,7 +391,7 @@ namespace ordlist {
                 int a[nLimit];
                 for (int i = 0; i < nLimit; ++i)
                     a[i]=i;
-                std::random_shuffle( a, a + nLimit );
+                shuffle( a, a + nLimit );
 
                 // extract/get
                 for ( int i = 0; i < nLimit; ++i )
index aef800949cfe2febe9d289b2c40f4cd1a08e182b..d2429118792dbe895d1e1f41061867f0d7943c84 100644 (file)
@@ -8,7 +8,6 @@
 #include <cds/os/timer.h>
 #include <cds/opt/hash.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 namespace cds { namespace container {}}
 
index 327090db17e15ed72a10f62f0973d1e5582f27f0..8db81e989e4e93d6466de5b60496351536b88abc 100644 (file)
@@ -8,7 +8,6 @@
 #include <cds/os/timer.h>
 #include <cds/opt/hash.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 namespace cds { namespace container {}}
 
@@ -202,7 +201,7 @@ namespace map {
                 int arrRandom[nLimit];
                 for ( int i = 0; i < nLimit; ++i )
                     arrRandom[i] = i;
-                std::random_shuffle( arrRandom, arrRandom + nLimit );
+                shuffle( arrRandom, arrRandom + nLimit );
 
                 for ( int i = 0; i < nLimit; ++i )
                     CPPUNIT_ASSERT( m.insert( arrRandom[i], arrRandom[i] ));
@@ -281,7 +280,7 @@ namespace map {
                 int arr[nLimit];
                 for ( size_t i = 0; i < nLimit; ++i )
                     arr[i] = (int) i;
-                std::random_shuffle( arr, arr + nLimit );
+                shuffle( arr, arr + nLimit );
 
                 for ( size_t i = 0; i < nLimit; ++i )
                     CPPUNIT_ASSERT( m.insert( arr[i], arr[i] ));
index d919a1d28334544fab35c99e9b23872f69b8b189..5b57a8156743a942cbb1c8628d484b0b8ce7c8a7 100644 (file)
@@ -102,7 +102,7 @@ namespace map {
                 for ( int i = 0; i < nLimit; ++i ) {
                     nRand[i] = i;
                 }
-                std::random_shuffle( nRand, nRand + nLimit );
+                shuffle( nRand, nRand + nLimit );
 
                 for ( int i = 0; i < nLimit; ++i ) {
                     CPPUNIT_ASSERT( m.insert( nRand[i], nRand[i]) );
@@ -140,7 +140,7 @@ namespace map {
                 int arrItem[nLimit];
                 for ( int i = 0; i < nLimit; ++i )
                     arrItem[i] = i;
-                std::random_shuffle( arrItem, arrItem + nLimit );
+                shuffle( arrItem, arrItem + nLimit );
 
                 typedef base_class::less less;
 
index 6526e2c60c9cb963577689363a0da8ad068410ef..70a0dd655b88748ec66e6d8810ee254dbc21a7ab 100644 (file)
@@ -115,7 +115,7 @@ namespace map {
                 for ( int i = 0; i < nLimit; ++i ) {
                     nRand[i] = i;
                 }
-                std::random_shuffle( nRand, nRand + nLimit );
+                shuffle( nRand, nRand + nLimit );
 
                 for ( int i = 0; i < nLimit; ++i ) {
                     CPPUNIT_ASSERT( m.insert(i, i) );
@@ -158,7 +158,7 @@ namespace map {
                 int arrItem[nLimit];
                 for ( int i = 0; i < nLimit; ++i )
                     arrItem[i] = i;
-                std::random_shuffle( arrItem, arrItem + nLimit );
+                shuffle( arrItem, arrItem + nLimit );
 
                 typedef typename Map::value_type value_type;
                 typename Map::exempt_ptr ep;
index edaade8c00349495aef89af24a24365280b34195..9d5b35b9f5520271057cfde92a2993b68d7ee89e 100644 (file)
@@ -8,7 +8,6 @@
 #include <cds/os/timer.h>
 #include <cds/opt/hash.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 namespace cds { namespace container {}}
 
index 268f1c136abc57afcb013ffc845687115cf168d6..7824fdbcfb5372b7caaf6af387ff8bda613051ed 100644 (file)
@@ -62,7 +62,7 @@ namespace priority_queue {
                 for ( T * p = pFirst; p != pLast; ++p, ++i )
                     *p = i;
 
-                std::random_shuffle( pFirst, pLast );
+                shuffle( pFirst, pLast );
             }
 
             ~data_array()
index eadbc7e269f92121760667f84133c83424be1e10..b05dd8fabbbed728862c6ed04e18da6085b40339 100644 (file)
@@ -98,7 +98,7 @@ namespace priority_queue {
                 for ( T * p = pFirst; p != pLast; ++p, ++i )
                     p->k = p->v = i;
 
-                std::random_shuffle( pFirst, pLast );
+                shuffle( pFirst, pLast );
             }
 
             ~data_array()
index 8c80865378ca600bde8843e38784d4f5c020738a..367429360a118b14a48ed27d36690b48ea07649d 100644 (file)
@@ -9,7 +9,6 @@
 #include <cds/opt/hash.h>
 #include <cds/os/timer.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 // forward namespace declaration
 namespace cds {
index 48ed8c98c638f8a850235fd6e5c64f35d0f2a6ab..7da9e1541e1605ac4a005731862329ff76d65ff5 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <cds/opt/hash.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 // forward declaration
 namespace cds { namespace intrusive {} }
@@ -493,7 +492,7 @@ namespace set {
                 int arr[nLimit];
                 for ( size_t i = 0; i < nLimit; ++i )
                     arr[i] = (int) i;
-                std::random_shuffle( arr, arr + nLimit );
+                shuffle( arr, arr + nLimit );
 
                 for ( size_t i = 0; i < nLimit; ++i ) {
                     arrItems[i].nKey = arr[i];
@@ -1022,7 +1021,7 @@ namespace set {
                 int arr[nLimit];
                 for ( size_t i = 0; i < nLimit; ++i )
                     arr[i] = (int) i;
-                std::random_shuffle( arr, arr + nLimit );
+                shuffle( arr, arr + nLimit );
 
                 for ( size_t i = 0; i < nLimit; ++i ) {
                     arrItems[i].nKey = arr[i];
index 60549192b3d0db35605cff6a44eb6e9faad8c0a3..6d882bde8bbb8d7538abf94855dc86b9a57a273e 100644 (file)
@@ -333,7 +333,7 @@ namespace set {
             for ( int i = 0; i < (int) c_nArrSize; ++i ) {
                 nRand[i] = i;
             }
-            std::random_shuffle( nRand, nRand + c_nArrSize );
+            shuffle( nRand, nRand + c_nArrSize );
 
             for ( int i = 0; i < (int) c_nArrSize; ++i ) {
                 pArr[i].nKey = nRand[i];
index 685747538c35e60c1dfc83afba1ce32075e08019..d4898a04594dc9de7e5e9966cd6cfb31767fb9bf 100644 (file)
@@ -384,7 +384,7 @@ namespace set {
             for ( int i = 0; i < (int) c_nArrSize; ++i ) {
                 nRand[i] = i;
             }
-            std::random_shuffle( nRand, nRand + c_nArrSize );
+            shuffle( nRand, nRand + c_nArrSize );
 
             for ( int i = 0; i < (int) c_nArrSize; ++i ) {
                 pArr[i].nKey = nRand[i];
index 643b7c25ed819821b706bb643024e9eaba872b45..aeaa2ac3e958c419c37d2de7ffdc6f7efbe6de1d 100644 (file)
@@ -9,7 +9,6 @@
 #include <cds/opt/hash.h>
 #include <cds/os/timer.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 // forward namespace declaration
 namespace cds {
@@ -353,7 +352,7 @@ namespace set {
                 int arrRandom[nLimit];
                 for ( int i = 0; i < nLimit; ++i )
                     arrRandom[i] = i;
-                std::random_shuffle( arrRandom, arrRandom + nLimit );
+                shuffle( arrRandom, arrRandom + nLimit );
 
                 for ( int i = 0; i < nLimit; ++i )
                     CPPUNIT_ASSERT( s.insert( arrRandom[i] ));
@@ -431,7 +430,7 @@ namespace set {
                 int arr[nLimit];
                 for ( size_t i = 0; i < nLimit; ++i )
                     arr[i] = (int) i;
-                std::random_shuffle( arr, arr + nLimit );
+                shuffle( arr, arr + nLimit );
 
                 for ( size_t i = 0; i < nLimit; ++i )
                     CPPUNIT_ASSERT( s.insert( arr[i] ));
index 73317055188731d8a7412f9d03d4707eca1b6892..31ed877977e70b873c288621a62bda91b3ecf2d7 100644 (file)
@@ -31,7 +31,7 @@ namespace set {
             int arrRandom[nLimit];
             for ( int i = 0; i < nLimit; ++i )
                 arrRandom[i] = i;
-            std::random_shuffle( arrRandom, arrRandom + nLimit );
+            shuffle( arrRandom, arrRandom + nLimit );
 
 
             // Test iterator - ascending order
index 0f8305cb93776c5a9df13c64d56aa701215ef993..c655ed18589cf4070ae5483ec8024b9f7b68e374 100644 (file)
@@ -31,7 +31,7 @@ namespace set {
             int arrRandom[nLimit];
             for ( int i = 0; i < nLimit; ++i )
                 arrRandom[i] = i;
-            std::random_shuffle( arrRandom, arrRandom + nLimit );
+            shuffle( arrRandom, arrRandom + nLimit );
 
             // Test iterator - ascending order
             s.clear();
index e9b0e5aa7f69eb208668e260c0e4f271ae6c276c..3ff6a3c3cff96988aa120c21b3c9daeecb9dfa44 100644 (file)
@@ -9,7 +9,6 @@
 #include <cds/opt/hash.h>
 #include <cds/os/timer.h>
 #include <functional>   // ref
-#include <algorithm>    // random_shuffle
 
 // forward namespace declaration
 namespace cds {
index b6ffe24b8bd4c7f1e9ab34bf751688375fd3d1c2..7db257478eb16fe3e721d202586a6bb1c96bb266 100644 (file)
@@ -313,7 +313,7 @@ namespace tree {
             int keys[1000];
             for ( key_type i = 0; i < static_cast<key_type>(sizeof(keys) / sizeof(keys[0])); ++i )
                 keys[i] = i;
-            std::random_shuffle( keys, keys + sizeof(keys) / sizeof(keys[0]));
+            shuffle( keys, keys + sizeof(keys) / sizeof(keys[0]));
 
             size_t nCount = 1;
             int nPrev;
index 0053187d865d10899faadf7950cf9630f4f56ff0..42811d00e42c037bc2b7dde7068f835b4d5d8776 100644 (file)
@@ -186,7 +186,7 @@ namespace tree {
                 for ( int * p = pFirst; p != pLast; ++p, ++i )
                     *p = i;
 
-                std::random_shuffle( pFirst, pLast );
+                shuffle( pFirst, pLast );
             }
 
             ~data_array()
index 5d3b2aefd0c2a6365a7979edfd90dfec73f6b505..98668fc6a81298086ca82627bc46f8d95382a07e 100644 (file)
@@ -187,7 +187,7 @@ namespace tree {
                 for ( int * p = pFirst; p != pLast; ++p, ++i )
                     *p = i;
 
-                std::random_shuffle( pFirst, pLast );
+                shuffle( pFirst, pLast );
             }
 
             ~data_array()
index af2fb8acc8575a53c3605b85ee1705375f739ff1..f511966c4c2562cdff61e3ed16d77238d61614a9 100644 (file)
@@ -261,7 +261,7 @@ namespace tree {
                     p->nValue = i * 2;
                 }
 
-                std::random_shuffle( pFirst, pLast );
+                shuffle( pFirst, pLast );
             }
 
             ~data_array()
index 5b201ff826fa15dc837e544e994d98ba92d3d837..7eddd466d2b7a27b9506bdc18552122bd463b419 100644 (file)
@@ -33,7 +33,7 @@ namespace map2 {
             if ( m_Arr[i].bExists )
                 ++m_nRealMapSize;
         }
-        std::random_shuffle( m_Arr.begin(), m_Arr.end() );
+        shuffle( m_Arr.begin(), m_Arr.end() );
     }
 
     void Map_find_int::initTestSequence()
index 77bbb81d9f0409885438d64df387b971281f3fc6..b7f54789d5aad1493fc9d0befbe46a9416e4070f 100644 (file)
@@ -6,7 +6,6 @@
 #include "cppunit/thread.h"
 
 #include <vector>
-#include <algorithm> // random_shuffle
 
 // find int test in map<int> in mutithreaded mode
 namespace map2 {
index 92f88f2dc95c734bdc96ee90c8c2f86318abdcea..e4e075b45c8c4faee0469a0d57188b098a43fda5 100644 (file)
@@ -7,7 +7,6 @@
 
 #include <cds/sync/spinlock.h>
 #include <vector>
-#include <algorithm>    // random_shuffle
 
 namespace map2 {
 
@@ -414,7 +413,7 @@ namespace map2 {
             m_arrValues.reserve( c_nMapSize );
             for ( size_t i = 0; i < c_nMapSize; ++i )
                 m_arrValues.push_back( i );
-            std::random_shuffle( m_arrValues.begin(), m_arrValues.end() );
+            shuffle( m_arrValues.begin(), m_arrValues.end() );
 
             CppUnitMini::ThreadPool pool( *this );
             pool.add( new InserterThread( pool, testMap ), c_nInsertThreadCount );
index 51a3c7dc7853ddc405b1f2753ced7529c35418fd..757a7acf84e43a91018e6108ae587cce323b0b16 100644 (file)
@@ -164,7 +164,7 @@ namespace map2 {
             m_arrValues.reserve( c_nMapSize );
             for ( size_t i = 0; i < c_nMapSize; ++i )
                 m_arrValues.push_back( i );
-            std::random_shuffle( m_arrValues.begin(), m_arrValues.end() );
+            shuffle( m_arrValues.begin(), m_arrValues.end() );
 
             CppUnitMini::ThreadPool pool( *this );
             pool.add( new InserterThread( pool, testMap ), c_nInsertThreadCount );
index fc7a2db4515f71e48036abe69493f7f484a0ac2c..298b970bd3e2defb511f755c083cfd088018315e 100644 (file)
@@ -4,7 +4,6 @@
 #include "cppunit/thread.h"
 
 #include <vector>
-#include <algorithm>    // random_shuffle
 
 namespace map2 {
 
@@ -177,7 +176,7 @@ namespace map2 {
                 v.reserve( c_nMapSize );
                 for ( size_t i = 0; i < c_nMapSize; ++i )
                     v.push_back( i );
-                std::random_shuffle( v.begin(), v.end() );
+                shuffle( v.begin(), v.end() );
                 for ( size_t i = 0; i < v.size(); ++i ) {
                     CPPUNIT_ASSERT( testMap.insert( v[i], v[i] ));
                 }
index e5d56bb589809c4ec9b03db984f375f3d1e4563d..08f8a32de2ba673144099e0b4c33997cc11834c2 100644 (file)
@@ -38,7 +38,7 @@ namespace map2 {
         pFirst = pLast;
         pLast = m_arrShuffle + sizeof(m_arrShuffle)/sizeof(m_arrShuffle[0]);
         std::fill( pFirst, pLast, do_find );
-        std::random_shuffle( m_arrShuffle, pLast );
+        shuffle( m_arrShuffle, pLast );
     }
 
     void Map_InsDelFind::myRun(const char *in_name, bool invert /*= false*/)
index 1b689c6c6900e6c0dbb10694921d1041753743a5..cf88b9c6ca2ca8ad2472e962aa6df07dd1c577e9 100644 (file)
@@ -2,7 +2,6 @@
 
 #include "map2/map_type.h"
 #include "cppunit/thread.h"
-#include <algorithm> // random_shuffle
 #include <vector>
 
 namespace map2 {
@@ -131,7 +130,7 @@ namespace map2 {
                 arr.reserve( c_nInitialMapSize );
                 for ( size_t i = 0; i < c_nInitialMapSize; ++i )
                     arr.push_back( i * 2 + 1);
-                std::random_shuffle( arr.begin(), arr.end() );
+                shuffle( arr.begin(), arr.end() );
                 for ( size_t i = 0; i < c_nInitialMapSize; ++i )
                     testMap.insert( arr[i], arr[i] );
             }
index 0eb0fc2f7e860e4b91d285e80cacce5fd07205cc..3f463095b4b555dc3b8b88123f0c66aeb69d9381 100644 (file)
@@ -5,7 +5,6 @@
 
 #include <cds/os/topology.h>
 #include <vector>
-#include <algorithm> // random_shuffle
 
 namespace map2 {
 
@@ -54,7 +53,7 @@ namespace map2 {
                 size_t nItem = m_nThreadNo;
                 for ( size_t i = 0; i < nSize; nItem += c_nThreadCount, ++i )
                     m_arrVal[i] = nItem;
-                std::random_shuffle( m_arrVal.begin(), m_arrVal.end() );
+                shuffle( m_arrVal.begin(), m_arrVal.end() );
             }
         public:
             size_t  m_nInsertSuccess;
index 3bb42d9b89e13710f279cad14502d71e75f0c0dd..30e144e772505496ecc496e30296cb40c21eff1b 100644 (file)
@@ -5,7 +5,6 @@
 #include "pqueue/pqueue_type.h"
 
 #include <vector>
-#include <algorithm>    // random_shuffle
 #include <memory>
 
 namespace pqueue {
@@ -77,7 +76,7 @@ namespace pqueue {
                 m_arr.reserve( nEnd - nStart );
                 for ( size_t i = nStart; i < nEnd; ++i )
                     m_arr.push_back( i );
-                std::random_shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end() );
             }
         };
 
index 4ce079269ca743c2d71a9ab6c1a4b15fff5b5cda..ff9b97b0978cdae0f90db566e6a488f6c37a4e70 100644 (file)
@@ -5,7 +5,6 @@
 #include "pqueue/pqueue_type.h"
 
 #include <vector>
-#include <algorithm>    // random_shuffle
 #include <memory>
 
 namespace pqueue {
@@ -76,7 +75,7 @@ namespace pqueue {
                 m_arr.reserve( nEnd - nStart );
                 for ( size_t i = nStart; i < nEnd; ++i )
                     m_arr.push_back( i );
-                std::random_shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end() );
             }
         };
 
index 51c27ebaaa8251205f32310fa856d2300bf62eb6..d53e8596eaa29198e06bd35c1e4286f16a7df1e0 100644 (file)
@@ -5,7 +5,6 @@
 #include "pqueue/pqueue_type.h"
 
 #include <vector>
-#include <algorithm>    // random_shuffle
 #include <memory>
 
 namespace pqueue {
@@ -80,7 +79,7 @@ namespace pqueue {
                 m_arr.reserve( nEnd - nStart );
                 for ( size_t i = nStart; i < nEnd; ++i )
                     m_arr.push_back( i );
-                std::random_shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end() );
             }
         };
 
index ca0333310932795f589e5cdd925a8fcaf9b51834..3ad6a8820b8852df4242068408ca02579b4809ce 100644 (file)
@@ -31,7 +31,7 @@ namespace set2 {
         m_arrData.resize( c_nSetSize );
         for ( size_t i = 0; i < c_nSetSize; ++i )
             m_arrData[i] = i;
-        std::random_shuffle( m_arrData.begin(), m_arrData.end() );
+        shuffle( m_arrData.begin(), m_arrData.end() );
     }
 
     void Set_DelOdd::myRun(const char *in_name, bool invert /*= false*/)
index b6291a14068806365b94d796cc8371b65ab1722e..e224d1f6e311c1a135cb0471260322934648e05c 100644 (file)
@@ -2,7 +2,6 @@
 
 #include "cppunit/thread.h"
 #include "set2/set_type.h"
-#include <algorithm> // random_shuffle
 
 namespace set2 {
 
index 88b2ff82a285d7d745ee162654be0449927dd0ea..a0635453ebb1529b62bfb0f000b10a440f83d673 100644 (file)
@@ -418,7 +418,7 @@ namespace set2 {
             m_pKeyLast = m_pKeyFirst + c_nMapSize;
             for ( size_t i = 0; i < c_nMapSize; ++i )
                 m_pKeyArr[i] = i;
-            std::random_shuffle( m_pKeyFirst, m_pKeyLast );
+            shuffle( m_pKeyFirst, m_pKeyLast );
 
             cds::OS::Timer    timer;
 
index be326ac38fff6a1580262515f218dc9899cd4979..56df57c7aed1a74b0a696e54b18262821412fce2 100644 (file)
@@ -37,7 +37,7 @@ namespace set2 {
         pFirst = pLast;
         pLast = m_arrShuffle + sizeof(m_arrShuffle)/sizeof(m_arrShuffle[0]);
         std::fill( pFirst, pLast, do_find );
-        std::random_shuffle( m_arrShuffle, pLast );
+        shuffle( m_arrShuffle, pLast );
     }
 
     void Set_InsDelFind::myRun(const char *in_name, bool invert /*= false*/)
index fbf828872bde31cc180495835f98581987878e78..bee344dfa075858414d3b94963176be1fa68a1f9 100644 (file)
@@ -2,7 +2,6 @@
 
 #include "set2/set_type.h"
 #include "cppunit/thread.h"
-#include <algorithm> // random_shuffle
 
 namespace set2 {
 
@@ -138,7 +137,7 @@ namespace set2 {
                 size_t * pEnd = pInitArr + c_nInitialMapSize;
                 for ( size_t i = 0; i < c_nInitialMapSize; ++i )
                     pInitArr[i] = i * 2 + 1;
-                std::random_shuffle( pInitArr, pEnd );
+                shuffle( pInitArr, pEnd );
                 for ( size_t * p = pInitArr; p < pEnd; ++p )
                     testSet.insert( typename Set::value_type( *p, *p ) );
                 delete [] pInitArr;