SparseCostMatrix: add an extra check to verify we are not out of bounds.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Embryonic sparse LAP tracker as in Jaquaman et al. 2008.

Right now there is the embryonic frame-to-frame linking support. it
copies what Nick did for the non sparse version, which copies the utrack
software rathter than the paper itself.

SparseLinker is as far as I want today.
Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Add utility methods to SparseCostMatrix.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Rename and finalize the SparseLinker.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Embryonic sparse LAP tracker integrated into TrackMate.

Does not generate track - BUG.
Just meant to do the frame to frame tracking.
Signed-off-byy Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Fix a bug in the GUI: not echoing error messages when tracking fails.

Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
Fix two bugs in SparseFrameToFrameLinker.

- The graph was not instantiated.
- We were passing the wrong settings map.
Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
Increase the sparsity in the frame-to-frame linking.

If a source does not have any non-infinite cost, then we do not include
it in the sparse matrix to compute assignments. Then, we do a little
gymnastic so that the assignments we return are indexes into the
original source list.
Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
A class to split a graph in segments, needed by the LAP framework.

Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
Make GraphSegmentSplitter more general.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Embryonic segment LAP linker. WIP

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Fix a bug in the Jaqaman linker preveting it from returning ALL assignments.

A bug introduced by trying to write a sparser version of the linker,
which is probably useless on top of that.
Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Remove useless settings in the settings map.

The CUTOFF percentile is not userd (not even by Nick LAP tracker, which
is weird). The BLOCKING_COST as well, since we have a sparse matrix now.
Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Fix a bug in SparseCostMatrix transpose method.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Add a method to SparseCostMatrix to write a value to all non-sparse values.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
WIP: work on the gap-closing only case.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
WIP: merging cost matrix creator.

Buggy. Addresses the wrong spots.
Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
More precise error message.

Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
SparseLAPFrameToFrameTracker: say where the error originates.

Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>
Fix the SegmentMergingCostMatrixCreator

For it to work, iteration order must be really well controlled.
Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>