-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (24 loc) · 685 Bytes
/
Copy pathmain.cpp
File metadata and controls
26 lines (24 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <vector>
#include "Algorithms.h"
#include <filesystem>
void generateRandK(int k, int len, string outputFilename){
ofstream output(outputFilename);
if (!output.is_open()) {
std::cerr << "Error opening file: " << outputFilename << std::endl;
return;
}
for (int i=0;i<len;++i){
output << (char)(rand() % k);
}
output.close();
}
int main(){
srand(time(nullptr));
// generateRandK(2,1e5,"tests/rand2/rand2.txt");
// generateRandK(32,1e5,"tests/rand32/rand32.txt");
// generateRandK(64,1e5,"tests/rand64/rand64.txt");
// return 0;
Algorithms algorithms;
algorithms.TestAllAlgorithms();
}