Directory: | ./ |
---|---|
File: | include/tsid/solvers/solver-HQP-factory.hxx |
Date: | 2024-11-10 01:12:44 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 3 | 4 | 75.0% |
Branches: | 2 | 6 | 33.3% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | // | ||
2 | // Copyright (c) 2017 CNRS | ||
3 | // | ||
4 | // This file is part of tsid | ||
5 | // tsid is free software: you can redistribute it | ||
6 | // and/or modify it under the terms of the GNU Lesser General Public | ||
7 | // License as published by the Free Software Foundation, either version | ||
8 | // 3 of the License, or (at your option) any later version. | ||
9 | // tsid is distributed in the hope that it will be | ||
10 | // useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
11 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | // General Lesser Public License for more details. You should have | ||
13 | // received a copy of the GNU Lesser General Public License along with | ||
14 | // tsid If not, see | ||
15 | // <http://www.gnu.org/licenses/>. | ||
16 | // | ||
17 | |||
18 | #ifndef __invdyn_solvers_hqp_factory_hxx__ | ||
19 | #define __invdyn_solvers_hqp_factory_hxx__ | ||
20 | |||
21 | #include <tsid/solvers/solver-HQP-factory.hpp> | ||
22 | #include <tsid/solvers/solver-HQP-eiquadprog-rt.hxx> | ||
23 | |||
24 | namespace tsid { | ||
25 | namespace solvers { | ||
26 | |||
27 | template <int nVars, int nEqCon, int nIneqCon> | ||
28 | 2 | SolverHQPBase* SolverHQPFactory::createNewSolver(const SolverHQP solverType, | |
29 | const std::string& name) { | ||
30 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (solverType == SOLVER_HQP_EIQUADPROG_RT) |
31 |
1/2✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
|
2 | return new SolverHQuadProgRT<nVars, nEqCon, nIneqCon>(name); |
32 | |||
33 | ✗ | PINOCCHIO_CHECK_INPUT_ARGUMENT(false, "Specified solver type not recognized"); | |
34 | return nullptr; | ||
35 | } | ||
36 | } // namespace solvers | ||
37 | } // namespace tsid | ||
38 | |||
39 | #endif // ifndef __invdyn_solvers_hqp_factory_hxx__ | ||
40 |