-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (20 loc) · 689 Bytes
/
main.cpp
File metadata and controls
27 lines (20 loc) · 689 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 "ProblemSolver.h"
#include "QBoundaryConstraint.h"
int main() {
ProblemSolver<4, int, QBoundaryConstraint, QBoundaryConstraint> problemSolver;
std::vector<int *> items(4);
for (int i = 0; i < 4; ++i) {
items[i] = new int(i);
}
QBoundaryConstraint *boundaryConstraint = new QBoundaryConstraint();
std::vector<int *> result = problemSolver.Solve(items, boundaryConstraint);
if (result.size() == 0) {
std::cout << "No solutions found" << std::endl;
} else {
for (int i = 0; i < result.size(); ++i) {
std::cout << "Result is - " << *result[i] << std::endl;
}
}
return 0;
}