sync most c++ examples
This commit is contained in:
@@ -13,12 +13,15 @@
|
||||
|
||||
// Integer programming example that shows how to use the API.
|
||||
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "absl/flags/parse.h"
|
||||
#include "absl/flags/usage.h"
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
|
||||
namespace operations_research {
|
||||
void RunIntegerProgrammingExample(const std::string& solver_id) {
|
||||
void RunIntegerProgrammingExample(absl::string_view solver_id) {
|
||||
LOG(INFO) << "---- Integer programming example with " << solver_id << " ----";
|
||||
|
||||
MPSolver::OptimizationProblemType problem_type;
|
||||
@@ -87,9 +90,7 @@ void RunAllExamples() {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
absl::SetFlag(&FLAGS_logtostderr, true);
|
||||
absl::SetFlag(&FLAGS_log_prefix, false);
|
||||
absl::ParseCommandLine(argc, argv);
|
||||
operations_research::RunAllExamples();
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user