StateEstimation::HungarianAssignment
StateEstimation::HungarianAssignment
Hungarian algorithm implementation for assignment.
#include <AssignmentProblem.hpp>
Inherits from StateEstimation::AssignmentProblem
Public Functions
| Name | |
|---|---|
| HungarianAssignment(CostFunction cost_func =[nullptr]) Construct with custom cost function. |
|
| virtual AssignmentResult | solve(std::vector< FeatureVector > const & objects, std::vector< FeatureVector > const & targets, AssignmentConstraints const & constraints ={}) const override Solve assignment between objects and targets using feature vectors. |
| virtual AssignmentResult | solve(std::vector< std::vector< double > > const & cost_matrix, AssignmentConstraints const & constraints ={}) const override Solve assignment using pre-computed cost matrix. |
| virtual std::string | getName() const override Get name of the assignment algorithm. |
| void | setCostFunction(CostFunction cost_func) Set custom cost function. |
Additional inherited members
Public Functions inherited from StateEstimation::AssignmentProblem
| Name | |
|---|---|
| virtual | ~AssignmentProblem() =default |
Public Functions Documentation
function HungarianAssignment
explicit HungarianAssignment(
CostFunction cost_func =nullptr
)Construct with custom cost function.
Parameters:
- cost_func Function to compute cost between object and target
function solve
virtual AssignmentResult solve(
std::vector< FeatureVector > const & objects,
std::vector< FeatureVector > const & targets,
AssignmentConstraints const & constraints ={}
) const overrideSolve assignment between objects and targets using feature vectors.
Parameters:
- objects Feature vectors for objects to be assigned
- targets Feature vectors for assignment targets
- constraints Assignment constraints
Return: Assignment result
Reimplements: StateEstimation::AssignmentProblem::solve
function solve
virtual AssignmentResult solve(
std::vector< std::vector< double > > const & cost_matrix,
AssignmentConstraints const & constraints ={}
) const overrideSolve assignment using pre-computed cost matrix.
Parameters:
- cost_matrix Cost matrix where cost_matrix[i][j] is cost of assigning object i to target j
- constraints Assignment constraints
Return: Assignment result
Reimplements: StateEstimation::AssignmentProblem::solve
function getName
inline virtual std::string getName() const overrideGet name of the assignment algorithm.
Reimplements: StateEstimation::AssignmentProblem::getName
function setCostFunction
inline void setCostFunction(
CostFunction cost_func
)Set custom cost function.
Updated on 2026-11-13 at 20:25:41 +0000