Skip to content

Commit ba338d4

Browse files
committed
algorithms: export from google3
1 parent 9253009 commit ba338d4

8 files changed

Lines changed: 7 additions & 18 deletions

ortools/algorithms/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ cc_library(
221221
"//ortools/sat:cp_model",
222222
"//ortools/sat:cp_model_cc_proto",
223223
"//ortools/sat:cp_model_solver",
224+
"//ortools/sat:sat_parameters_cc_proto",
224225
"//ortools/util:bitset",
225226
"//ortools/util:time_limit",
226227
"@abseil-cpp//absl/log",

ortools/algorithms/adjustable_k_ary_heap_test.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "absl/random/random.h"
2424
#include "gtest/gtest.h"
2525
#include "ortools/base/strong_int.h"
26-
#include "ortools/base/strong_vector.h"
2726

2827
namespace operations_research {
2928

ortools/algorithms/binary_indexed_tree_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
#include "ortools/algorithms/binary_indexed_tree.h"
1515

16+
#include <vector>
17+
1618
#include "gtest/gtest.h"
1719

1820
namespace operations_research {

ortools/algorithms/dynamic_permutation.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
#include "ortools/algorithms/dynamic_permutation.h"
1515

16-
#include <algorithm>
1716
#include <memory>
1817
#include <string>
1918
#include <vector>
2019

20+
#include "absl/log/check.h"
2121
#include "absl/types/span.h"
2222
#include "ortools/algorithms/sparse_permutation.h"
2323

ortools/algorithms/knapsack_solver.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "ortools/algorithms/knapsack_solver.h"
1515

1616
#include <algorithm>
17+
#include <cmath>
1718
#include <cstdint>
1819
#include <limits>
1920
#include <memory>
@@ -32,6 +33,7 @@
3233
#include "ortools/sat/cp_model.h"
3334
#include "ortools/sat/cp_model.pb.h"
3435
#include "ortools/sat/cp_model_solver.h"
36+
#include "ortools/sat/sat_parameters.pb.h"
3537
#include "ortools/util/bitset.h"
3638
#include "ortools/util/time_limit.h"
3739

@@ -1293,7 +1295,7 @@ class KnapsackCpSat : public BaseKnapsackSolver {
12931295
const std::vector<int64_t>& capacities) override;
12941296

12951297
// Solves the problem and returns the profit of the optimal solution.
1296-
int64_t Solve(TimeLimit* time_limit, double time_limit_in_seconds,
1298+
int64_t Solve(TimeLimit* time_limit, double time_limit_in_second,
12971299
bool* is_solution_optimal) override;
12981300

12991301
// Returns true if the item 'item_id' is packed in the optimal knapsack.

ortools/algorithms/multikey_radix_sort_benchmark.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <cstddef>
1616
#include <cstdint>
1717
#include <limits>
18-
#include <string>
1918
#include <type_traits>
2019
#include <utility>
2120
#include <vector>

ortools/algorithms/space_saving_most_frequent_benchmark.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,10 @@
1212
// limitations under the License.
1313

1414
#include <array>
15-
#include <cstddef>
16-
#include <cstdint>
17-
#include <functional>
18-
#include <memory>
19-
#include <optional>
2015
#include <random>
21-
#include <string>
22-
#include <tuple>
2316
#include <utility>
2417
#include <vector>
2518

26-
#include "absl/algorithm/container.h"
27-
#include "absl/base/nullability.h"
28-
#include "absl/hash/hash.h"
29-
#include "absl/log/check.h"
30-
#include "absl/random/distributions.h"
3119
#include "absl/random/random.h"
3220
#include "benchmark/benchmark.h"
3321
#include "ortools/algorithms/space_saving_most_frequent.h"

ortools/algorithms/space_saving_most_frequent_test.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313

1414
#include "ortools/algorithms/space_saving_most_frequent.h"
1515

16-
#include <array>
1716
#include <cstddef>
1817
#include <cstdint>
1918
#include <functional>
2019
#include <memory>
2120
#include <optional>
22-
#include <random>
2321
#include <string>
2422
#include <tuple>
2523
#include <utility>

0 commit comments

Comments
 (0)