FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Hungarian.h
1
2// Hungarian.h: Header file for Class HungarianAlgorithm.
3//
4// This is a C++ wrapper with slight modification of a hungarian algorithm implementation by Markus Buehren.
5// The original implementation is a few mex-functions for use in MATLAB, found here:
6// http://www.mathworks.com/matlabcentral/fileexchange/6543-functions-for-the-rectangular-assignment-problem
7//
8// Both this code and the orignal code are published under the BSD license.
9// by Cong Ma, 2016
10//
11
12#ifndef HUNGARIAN_H
13#define HUNGARIAN_H
14
15#include <iostream>
16#include <vector>
17
18using namespace std;
19
21 public:
24 double Solve(vector<vector<double> > &DistMatrix, vector<int> &Assignment);
25
26 private:
27 void assignmentoptimal(int *assignment, double *cost, double *distMatrix, int nOfRows, int nOfColumns);
28 void buildassignmentvector(int *assignment, bool *starMatrix, int nOfRows, int nOfColumns);
29 void computeassignmentcost(int *assignment, double *cost, double *distMatrix, int nOfRows);
30 void step2a(int *assignment, double *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, int nOfRows, int nOfColumns, int minDim);
31 void step2b(int *assignment, double *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, int nOfRows, int nOfColumns, int minDim);
32 void step3(int *assignment, double *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, int nOfRows, int nOfColumns, int minDim);
33 void step4(int *assignment, double *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, int nOfRows, int nOfColumns, int minDim, int row, int col);
34 void step5(int *assignment, double *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, int nOfRows, int nOfColumns, int minDim);
35};
36
37#endif
Definition: Hungarian.h:20