AliceVision
Photogrammetric Computer Vision Framework
MOSEKSolver.hpp
1 // This file is part of the AliceVision project.
2 // Copyright (c) 2016 AliceVision contributors.
3 // Copyright (c) 2012 openMVG contributors.
4 // This Source Code Form is subject to the terms of the Mozilla Public License,
5 // v. 2.0. If a copy of the MPL was not distributed with this file,
6 // You can obtain one at https://mozilla.org/MPL/2.0/.
7 
8 #pragma once
9 
10 #include "aliceVision/numeric/numeric.hpp"
11 #include "aliceVision/linearProgramming/ISolver.hpp"
12 
13 extern "C"
14 {
15 #include "mosek.h"
16 }
17 
18 #include <vector>
19 
20 namespace aliceVision {
21 namespace linearProgramming {
22 
24 class MOSEKSolver : public ISolver
25 {
26  public:
27  MOSEKSolver(int nbParams);
28 
29  ~MOSEKSolver();
30 
31  //--
32  // Inherited functions :
33  //--
34 
35  bool setup(const LPConstraints& constraints);
36  bool setup(const LPConstraintsSparse& constraints);
37 
38  bool solve();
39 
40  bool getSolution(std::vector<double>& estimatedParams);
41 
42  private:
43  // MSKenv_t env;
44  MSKtask_t task; // Solver object.
45 };
46 
47 } // namespace linearProgramming
48 } // namespace aliceVision
aliceVision::linearProgramming::LPConstraints
Definition: ISolver.hpp:25
aliceVision::linearProgramming::MOSEKSolver::solve
bool solve()
Setup the feasibility and found the solution that best fit the constraint.
Definition: MOSEKSolver.cpp:352
aliceVision
Definition: checkerDetector.cpp:32
aliceVision::linearProgramming::MOSEKSolver
MOSEK wrapper for the ISolver.
Definition: MOSEKSolver.hpp:24
aliceVision::linearProgramming::MOSEKSolver::getSolution
bool getSolution(std::vector< double > &estimatedParams)
Get back solution. Call it after solve.
Definition: MOSEKSolver.cpp:397
aliceVision::linearProgramming::LPConstraintsSparse
Definition: ISolver.hpp:54
aliceVision::linearProgramming::MOSEKSolver::setup
bool setup(const LPConstraints &constraints)
Setup constraint for the given library.
Definition: MOSEKSolver.cpp:74
aliceVision::linearProgramming::ISolver
Definition: ISolver.hpp:74