Skip to content

Commit 0b94fad

Browse files
committed
graph: fix few benchmark implem.
1 parent d35af35 commit 0b94fad

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

ortools/graph/dag_constrained_shortest_path_benchmark.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ BuildRandomDag(const NodeIndex num_nodes, const ArcIndex num_arcs) {
3939
absl::BitGen bit_gen;
4040
CHECK_GE(num_nodes, 2);
4141
CHECK_GE(num_arcs, 1);
42-
CHECK_LE(num_arcs, (num_nodes * (num_nodes - 1)) / 2);
42+
CHECK_LE(num_arcs, (int64_t{num_nodes} * (num_nodes - 1)) / 2);
4343
std::vector<NodeIndex> topological_order(num_nodes);
4444
topological_order.back() = num_nodes - 1;
4545
absl::Span<NodeIndex> non_start_end =

ortools/graph/linear_assignment_benchmark.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ ConstructRandomAssignmentForNewGraphApi(const int left_nodes,
4848
}
4949

5050
// Finalize the graph.
51-
std::vector<typename GraphType::ArcIndex> permutation;
52-
auto graph = std::move(builder).BuildAndPermute(permutation, arc_costs);
51+
auto graph = std::move(builder).BuildAndPermute(arc_costs);
5352

5453
// Create the assignment.
5554
auto assignment = std::make_unique<LinearSumAssignment<GraphType, int64_t>>(

0 commit comments

Comments
 (0)