-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringGenerator.h
More file actions
38 lines (30 loc) · 898 Bytes
/
Copy pathStringGenerator.h
File metadata and controls
38 lines (30 loc) · 898 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
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef STRINGGENERATOR_H
#define STRINGGENERATOR_H
#include <random>
#include <string>
#include <vector>
class StringGenerator {
private:
int32_t seed;
int32_t amount;
std::string dictionary;
int32_t str_length_min;
int32_t str_length_max;
int32_t arr_length_min;
int32_t arr_length_max;
std::mt19937 gen;
std::vector<std::string> base_random_arr;
std::vector<std::string> base_sorted_arr;
std::vector<std::string> base_reverse_sorted_arr;
std::vector<std::string> base_almost_sorted_arr;
std::string generate_next_str();
void generate_base_arrays();
public:
StringGenerator();
std::vector<std::string> getRandomArr(int size);
std::vector<std::string> getSortedArr(int size);
std::vector<std::string> getReverseSortedArr(int size);
std::vector<std::string> getAlmostSortedArr(int size);
std::vector<std::string> getSpecialArr(int size);
};
#endif