funkelab / motile

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

Consider renaming solver.add_constraints and solver.add_costs #63

Open cmalinmayor opened 8 months ago

cmalinmayor commented 8 months 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 4 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.