Several changes. \n If new map is added to mapstorage it emits signal with the name of the new map. This was important, because from now on not only tha mapwin should be updated. \n Furthermore algobox gets a pointer to mapstorage instead of only the mapnames from it. This is important because without it it would be complicated to pass all of the required maps to algobox.
3 #include <lemon/time_measure.h>
4 #include <lemon/smart_graph.h>
5 #include <lemon/graph_utils.h>
6 #include <lemon/maps.h>
7 #include <lemon/error.h>
9 #include <lemon/radix_sort.h>
16 using namespace lemon;
18 void testRadixSort() {
21 for (int i = 0; i < n; ++i) {
22 data[i] = (int)(1000 * (rand() / (RAND_MAX + 1.0))) - 500;
24 radixSort(data.begin(), data.end());
28 void testCounterSort() {
31 for (int i = 0; i < n; ++i) {
32 data[i] = (int)(1000 * (rand() / (RAND_MAX + 1.0))) - 500;
34 counterSort(data.begin(), data.end());
40 for (int i = 0; i < n; ++i) {
41 data[i] = (int)(1000 * (rand() / (RAND_MAX + 1.0))) - 500;
43 sort(data.begin(), data.end());
46 void testStableSort() {
49 for (int i = 0; i < n; ++i) {
50 data[i] = (int)(1000 * (rand() / (RAND_MAX + 1.0))) - 500;
52 stable_sort(data.begin(), data.end());
60 cout << "Radix sort: " << runningTimeTest(testRadixSort, 60) << endl;
61 cout << "Counter sort: " << runningTimeTest(testCounterSort, 60) << endl;
62 cout << "Standard sort: " << runningTimeTest(testSort, 60) << endl;
63 cout << "Stable sort: " << runningTimeTest(testStableSort, 60) << endl;