18
18
#include " absl/log/check.h"
19
19
#include " absl/strings/match.h"
20
20
#include " absl/strings/str_join.h"
21
+ #include " absl/strings/string_view.h"
21
22
#include " absl/time/time.h"
22
23
#include " ortools/algorithms/set_cover_heuristics.h"
23
24
#include " ortools/algorithms/set_cover_invariant.h"
@@ -141,8 +142,7 @@ FileFormat ParseFileFormat(const std::string& format_name) {
141
142
}
142
143
}
143
144
144
- SetCoverModel ReadModel (const std::string& input_file,
145
- FileFormat input_format) {
145
+ SetCoverModel ReadModel (absl::string_view input_file, FileFormat input_format) {
146
146
switch (input_format) {
147
147
case FileFormat::ORLIB_SCP:
148
148
return ReadOrlibScp (input_file);
@@ -160,7 +160,7 @@ SetCoverModel ReadModel(const std::string& input_file,
160
160
}
161
161
}
162
162
163
- SubsetBoolVector ReadSolution (const std::string& input_file,
163
+ SubsetBoolVector ReadSolution (absl::string_view input_file,
164
164
FileFormat input_format) {
165
165
switch (input_format) {
166
166
case FileFormat::TXT:
@@ -198,7 +198,7 @@ void WriteModel(const SetCoverModel& model, const std::string& output_file,
198
198
}
199
199
200
200
void WriteSolution (const SetCoverModel& model, const SubsetBoolVector& solution,
201
- const std::string& output_file, FileFormat output_format) {
201
+ absl::string_view output_file, FileFormat output_format) {
202
202
switch (output_format) {
203
203
case FileFormat::TXT:
204
204
WriteSetCoverSolutionText (model, solution, output_file);
0 commit comments