8#ifndef OCEAN_CV_DETECTOR_BULLSEYES_ASSIGNMENTSOLVER_H
9#define OCEAN_CV_DETECTOR_BULLSEYES_ASSIGNMENTSOLVER_H
115 constexpr static Index32 invalidIndex();
This class solves assignment problems using the Hungarian/Kuhn-Munkres algorithm.
Definition AssignmentSolver.h:50
static constexpr Index32 invalidIndex()
Returns an invalid index value used as a sentinel for unassigned rows/columns.
Definition AssignmentSolver.h:118
static bool solve(CostMatrix &&costMatrix, Assignments &assignments)
Solves the assignment problem for the given cost matrix using the Hungarian/Kuhn-Munkres algorithm.
IndexPair32 Assignment
An alias for an index pair.
Definition AssignmentSolver.h:57
static void findAugmentingPath(const CostMatrix &costMatrix, const size_t yStart, Indices32 &yAssignments, Indices32 &xAssignments, std::vector< uint8_t > &yVisited, std::vector< uint8_t > &xVisited, Indices32 &yParents)
Attempts to find an augmenting path starting from a given row using breadth-first search.
static void subtractRowAndColumnMinima(CostMatrix &costMatrix)
Performs the initial cost reduction by subtracting row and column minima from the cost matrix.
static bool reduceCostMatrix(const Indices32 &yAssignments, CostMatrix &costMatrix, std::vector< uint8_t > &yMarked, std::vector< uint8_t > &xMarked)
Reduces the cost matrix when no complete assignment can be found with current zeros.
IndexPairs32 Assignments
An alias for a vector of index pairs.
Definition AssignmentSolver.h:60
std::vector< IndexPair32 > IndexPairs32
Definition of a vector holding 32 bit index pairs.
Definition Base.h:144
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
std::pair< Index32, Index32 > IndexPair32
Definition of a pair holding 32 bit indices.
Definition Base.h:138
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::vector< Bullseye > Bullseyes
Definition of a vector holding bullseyes.
Definition Bullseye.h:103
The namespace covering the entire Ocean framework.
Definition Accessor.h:15