forked from pz4kybsvg/Conception
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
615 B
28 lines
615 B
// TODO(hongkai.dai) : delete this file when
|
|
// mixed_integer_optimization_test.cc and convex_optimization_test.cc are
|
|
// refactored.
|
|
#pragma once
|
|
|
|
#include <list>
|
|
#include <memory>
|
|
#include <utility>
|
|
|
|
#include "drake/solvers/solver_interface.h"
|
|
|
|
namespace drake {
|
|
namespace solvers {
|
|
namespace test {
|
|
|
|
template <typename Solver>
|
|
void AddSolverIfAvailable(
|
|
std::list<std::unique_ptr<SolverInterface>>* solver_list) {
|
|
auto solver = std::make_unique<Solver>();
|
|
if (solver->available()) {
|
|
solver_list->push_back(std::move(solver));
|
|
}
|
|
}
|
|
|
|
} // namespace test
|
|
} // namespace solvers
|
|
} // namespace drake
|