-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (26 loc) · 894 Bytes
/
main.cpp
File metadata and controls
28 lines (26 loc) · 894 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
#include "processor.h"
#include "queue.h"
#include "with_multiplicity.h"
class LoggerCallback {
public:
bool operator()(auto v) {
std::cout << v << std::endl;
return false;
}
};
int main(int argc, char* argv[]) {
if (argc != 4) {
std::cerr << "ERROR: arguments count must be 3" << std::endl;
return 1;
}
auto queue = Queue(WithMultiplicity(LinearFunction(1, 0)),
LinearFunction(2, std::strtoull(argv[1], nullptr, 10)),
LinearFunction(3, std::strtoull(argv[2], nullptr, 10)),
LinearFunction(6, std::strtoull(argv[3], nullptr, 10))
);
// auto processor = Processor<MultiplicityChecker>();
auto processor = Processor<LoggerCallback, MultiplicityChecker>();
processor.Process(
queue, WithMultiplicity(LinearFunction(100'000'000, 100'000'000))
);
}