funkelab / motile

Multi-Object Tracker using Integer Linear Equations
https://funkelab.github.io/motile/
MIT License
27 stars 5 forks source link

Consider renaming solver.add_constraints and solver.add_costs #63

Closed cmalinmayor closed 4 months ago

cmalinmayor commented 1 year ago

The plural add_constraints implies that one can add multiple constraints, but it takes only one motile.Constraint. I understand that under the hood, it adds multiple ILP constraints, but from the user perspective, the function just adds one Constraint, and the function makes more sense to be called add_constraint. Same argument for add_costs.

Thoughts @funkey?

cmalinmayor commented 9 months ago

Discussed with @funkey - decided to rename add_costs -> add_cost and add_constraints -> add_constraint. Also rename Costs base class to Cost. Breaking API change :( but okay because before version 1 still.