-
Notifications
You must be signed in to change notification settings - Fork 1
/
io_utils.h
34 lines (26 loc) · 1023 Bytes
/
io_utils.h
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
//
// Created by Roman Pogodin, 2018.
//
#ifndef K_CLIQUES_K_PARTITE_GRAPHS_IO_UTILS_H
#define K_CLIQUES_K_PARTITE_GRAPHS_IO_UTILS_H
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include "partite_binary_graph.h"
struct CommandLineArguments {
explicit CommandLineArguments(int32_t n_solutions_to_stop = -1,
std::string graph_filename = "./input.txt",
bool save_solutions = false)
: n_solution_to_stop(n_solutions_to_stop),
graph_filename(std::move(graph_filename)),
save_solutions(save_solutions) {};
int32_t n_solution_to_stop;
std::string graph_filename;
bool save_solutions;
};
CommandLineArguments ParseCommandLine(int32_t argc, char **argv);
PartiteBinaryGraph ReadGraph(std::istream &in_stream = std::cin);
void PrintMaxCliqueSolution(const PartiteGraphVisitor &visitor,
std::ostream &out_stream = std::cout);
#endif //K_CLIQUES_K_PARTITE_GRAPHS_IO_UTILS_H