-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (23 loc) · 699 Bytes
/
main.cpp
File metadata and controls
28 lines (23 loc) · 699 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
//
// Created by jgier on 25.10.2023.
//
#include <iostream>
#include "graph.h"
#include "dimacs_file_parser.h"
int main(int argc, char** argv){
if(argc < 2){
std::cerr << "Not enough arguments. Usage: " << argv[0] << " " << "<graph_file>" << std::endl;
return 1;
}
std::string filename = argv[1];
auto optional_graph = DIMACSFileParser::create_graph(filename);
if(not optional_graph){
return 1;
}
auto graph = optional_graph.value();
graph.greedy_matching();
graph.outer_vertex_scan();
std::cout << std::endl;
DIMACSFileParser::output_matching(graph);
std::cout << "Size of Node: " << sizeof(Graph::Node) << std::endl;
}