forked from motrom/fastmurty
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmurtysplitSparse.h
More file actions
30 lines (25 loc) · 871 Bytes
/
Copy pathmurtysplitSparse.h
File metadata and controls
30 lines (25 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
Michael Motro github.com/motrom/fastmurty 4/2/19
*/
#ifdef SPARSE
#include "subproblem.h"
#include "sparsematrix.h" // cs_di
typedef struct WorkvarsforSplitStruct {
double* row_cost_estimates;
int* row_best_columns;
bool* col_used;
int m;
int n;
int m_start;
int n_start;
} WorkvarsforSplit;
WorkvarsforSplit allocateWorkvarsforSplit(int m, int n);
void deallocateWorkvarsforSplit(WorkvarsforSplit workvars);
/* reorders the rows and columns so that subproblem creation is simple.
The first subproblem fixes all matches except row 0 and column 0, the next unfixes
row 1 and column 1 (or just row 1 if it has no match), and so on.
This function reorders the rows so that the earlier, smaller subproblems are more likely,
using a lookahead estimate as described in the paper.
*/
void murtySplit(cs_di c, Subproblem* prb, WorkvarsforSplit* workvars);
#endif