Files Classes Functions Hierarchy
#include <buckettest.h>
Static Public Member Functions | |
| static void | test01 () |
| Use bucket: sorting a array of doubles in range [0.0,1.0). | |
| static void | test02 () |
| Testing the buckets sorting time of doubles in the range [0.0,1.0) tested in progressive powers of two. | |
| static void | test03 () |
| Test the hybrid bucket sort time of doubles in the range [0.0,1.0) tested in progressive powers of two. | |
| static void | test04 () |
| Test hybrid bucket sort with bad data. | |
Static Public Attributes | |
| static string | doc [] |
| Brief description of each test. | |
Definition at line 9 of file buckettest.h.
| void buckettest::test01 | ( | ) | [static] |
Use bucket: sorting a array of doubles in range [0.0,1.0).
Definition at line 34 of file buckettest.cpp.
References bucket< T, HFN >::copy(), bucket< T, HFN >::eval(), and print().
Referenced by main().
00035 { 00036 cout << "Testing Bucket Sort" << endl << endl; 00037 00038 uintc n(10); 00039 00040 vector<double> v(n); 00041 fill(&v[0],n); 00042 00043 cout << "Vector of random values" << endl; 00044 cout << print(v,"\n"); 00045 cout << endl << endl; 00046 00047 00048 00049 cout << "Sorting" << endl; 00050 unitdouble f1(2*n); 00051 bucket<double,unitdouble> b(&v[0],n,f1); 00052 b.eval(); 00053 00054 vector<double> v2(n); 00055 b.copy(&v2[0]); 00056 00057 cout << print(v2) << endl; 00058 00059 }
| void buckettest::test02 | ( | ) | [static] |
Testing the buckets sorting time of doubles in the range [0.0,1.0) tested in progressive powers of two.
Definition at line 100 of file buckettest.cpp.
Referenced by main().
00101 { 00102 cout << "Testing Bucket Sort" << endl << endl; 00103 00104 cout << "Testing Sorting Time" << endl; 00105 00106 uint u=10000; 00107 for (uint k=0; k<10; ++k) 00108 { 00109 createandtest(u); 00110 u *= 2; 00111 } 00112 }
| void buckettest::test03 | ( | ) | [static] |
Test the hybrid bucket sort time of doubles in the range [0.0,1.0) tested in progressive powers of two.
Definition at line 146 of file buckettest.cpp.
Referenced by main().
00147 { 00148 cout << "Testing Bucket Hybrid Sort" << endl << endl; 00149 cout << "Testing Sorting Time" << endl; 00150 00151 uint u=10000; 00152 uint blen = 4; 00153 for (uint k=0; k<9; ++k) 00154 { 00155 createandtest2(u,blen); 00156 u *= 2; 00157 ++blen; 00158 } 00159 }
| void buckettest::test04 | ( | ) | [static] |
Test hybrid bucket sort with bad data.
Definition at line 188 of file buckettest.cpp.
Referenced by main().
00189 { 00190 cout << "Testing Bucket Hybrid Sort" << endl << endl; 00191 cout << "Testing Sorting Time" << endl; 00192 00193 uint u=1000; 00194 uint blen = 4; 00195 for (uint k=0; k<1; ++k) 00196 { 00197 createandtest3(u,blen); 00198 u *= 2; 00199 ++blen; 00200 } 00201 }
string buckettest::doc [static] |
Initial value:
{
"",
"Use bucket: sorting a array of doubles in range [0.0,1.0).",
"Testing the buckets sorting time of doubles in the range [0.0,1.0) tested in progressive powers of two.",
"Test the hybrid bucket sort time of doubles in the range [0.0,1.0) tested in progressive powers of two.",
"Test hybrid bucket sort with bad data."
}
Definition at line 35 of file buckettest.h.
Referenced by main().
1.5.8