MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
Munkres.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2014, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#pragma once
14
15#include <vector>
16
18{
19public:
21 {}
22
23 void runMunkres(std::vector<std::vector<float>>& matrix);
24
25private:
26 int** runMunkres(int** matrix, int n, bool max);
27
28 void step_one(int** matrix, int n, int& step);
29 void step_two(int** matrix, int n, int* rowCover, int* colCover, int** m, int& step);
30 void step_three(int n, int* colCover, int** m, int& step);
31 void step_four(int** matrix, int n, int* rowCover, int* colCover, int** m, int& path_row_0, int& path_col_0,
32 int& step);
33 void step_five(int n, int* rowCover, int* colCover, int** m, int& path_row_0, int& path_col_0, int& path_count,
34 int** path, int& step);
35 void step_six(int** matrix, int n, int* rowCover, int* colCover, int& step);
36
37 void find_a_zero(int** matrix, int n, int* rowCover, int* colCover, int& row, int& col);
38 bool star_in_row(int** m, int n, int row);
39 void find_star_in_row(int** m, int n, int row, int& col);
40 void find_star_in_col(int n, int** m, int c, int& r);
41 void find_prime_in_row(int n, int** m, int r, int& c);
42 void augment_path(int** m, int path_count, int** path);
43 void clear_covers(int n, int* rowCover, int* colCover);
44 void erase_primes(int n, int** m);
45 void find_smallest(int** matrix, int n, int* rowCover, int* colCover, int& minval);
46};
void runMunkres(std::vector< std::vector< float > > &matrix)
Munkres()
Definition Munkres.h:20
Target mlrange_cast(Source arg)
Generic version of checked ML casts.