-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
24 lines (20 loc) · 704 Bytes
/
main.cpp
File metadata and controls
24 lines (20 loc) · 704 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
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include "ObjectiveFunctions/AbsX.h"
int main() {
char* objective_function_name;
objective_function_name = getenv("OBJECTIVE_FUNCTION_NAME");
std::unique_ptr<direct::ObjectiveFunctionBase> objective_function;
if (strcmp("AbsX", objective_function_name) == 0) {
objective_function = std::unique_ptr<direct::ObjectiveFunctionBase>(
new direct::AbsX()
);
} else {
std::cerr << "Invalid function name." << std::endl;
std::exit(EXIT_FAILURE);
}
std::vector<direct::Rectangle> rectangles = objective_function->create_feasible_rectangles();
return 0;
}