type

assignment.Greedy

class Greedy(Assignment):

Greedy nearest-neighbour linear-assignment solver.

Sorts cost entries ascending and consumes them in order, claiming each row-column pair whose endpoints are still free. The result is locally optimal but not globally optimal; pairs whose cost exceeds the inherited :attr:`Assignment.threshold` are pre-masked to ``inf`` by the base class and never assigned. Useful as a low-cost baseline and when the cost matrix is sparse enough that the optimal solution coincides with the greedy one (e.g. high-confidence Re-ID after motion gating). See :func:`.greedy_assignment` for the underlying tensor shapes and dtypes.

Source: unitrack/assignment/_greedy.py:14