1
0
Fork 0

Adding upstream version 1:2.47.2.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
Daniel Baumann 2025-06-23 07:43:39 +02:00
parent fd5a0bafa2
commit 54102a2c29
Signed by: daniel.baumann
GPG key ID: BCC918A2ABD66424
4535 changed files with 1510258 additions and 0 deletions

22
linear-assignment.h Normal file
View file

@ -0,0 +1,22 @@
#ifndef LINEAR_ASSIGNMENT_H
#define LINEAR_ASSIGNMENT_H
/*
* Compute an assignment of columns -> rows (and vice versa) such that every
* column is assigned to at most one row (and vice versa) minimizing the
* overall cost.
*
* The parameter `cost` is the cost matrix: the cost to assign column j to row
* i is `cost[j + column_count * i].
*
* The arrays column2row and row2column will be populated with the respective
* assignments (-1 for unassigned, which can happen only if column_count !=
* row_count).
*/
void compute_assignment(int column_count, int row_count, int *cost,
int *column2row, int *row2column);
/* The maximal cost in the cost matrix (to prevent integer overflows). */
#define COST_MAX (1<<16)
#endif