Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long rozmiar = 1000; // liczność zbioru wejściowego
- float stosunek = 1; // stosunek wyjęć do wstawień
- std::cout << "Rozmiar: " << rozmiar << "\n";
- for (int i = 1; i <= rozmiar; i++) {
- a.setValue(gen.getRandom(0, 100));
- theQueue.put(a);
- }
- for (int i = 1; i <= rozmiar*stosunek ; i++) {
- try {
- theQueue.get();
- }
- catch (QueueException &exc) {
- std::cout << "get: empty\n";
- }
- }
- std::cout << "Comparisons: " << SimpleObject<int>::getComparisons() << "\n";
- std::cout << "Copyings: " << SimpleObject<int>::getCopyings() << "\n";
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement