RideDistributor  0.0.1
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
RLAPSolverJV.hpp
Go to the documentation of this file.
1 #ifndef RLAP_SOLVER_JV_H
2 #define RLAP_SOLVER_JV_H
3 
4 #include <list>
5 #include <unordered_set>
6 #include <vector>
7 #include <algorithm>
8 #include "Tensor.hpp"
9 #include "RLAPSolver.hpp"
10 
11 #define BIG 100000
12 
21 class RLAPSolverJV : public RLAPSolver {
22 public:
23 
28  RLAPSolverJV(const Tensor<int>& mat);
29 
30  void solve(Tensor<unsigned>& assignments) override;
31 
32 private:
33 
35  const unsigned rows;
36 
38  const unsigned cols;
39 
41  const unsigned size;
42 
44  std::vector<std::vector<double>> costMat;
45 
47  std::vector<int> rowsol;
48 
50  std::vector<int> colsol;
51 
61  void jvlap(int dim, const std::vector<std::vector<double>>& assigncost,
62  std::vector<int>& rowsol,
63  std::vector<int>& colsol, std::vector<double>& u, std::vector<double>& v);
64 
69  void assignMatching(Tensor<unsigned>& assignments);
70 };
71 
72 #endif // RLAP_SOLVER_JV_H
void solve(Tensor< unsigned > &assignments) override
Definition: RLAPSolverJV.cpp:46
Definition: RLAPSolver.hpp:11
RLAPSolverJV(const Tensor< int > &mat)
Definition: RLAPSolverJV.cpp:31
Definition: RLAPSolverJV.hpp:21