TOMHTAssignment:

--------------------------------------------------------------------------
   Track oriented MHT assignment. Generates hypotheses.
   This function calls the glpk function installed by GLPKMEX. If glpk is
   not installed an error will be thrown.

   The "b" matrix represents a stacked set of track-trees:
     each row is a different path through a track-tree;
     each column is a different scan;
     values in matrix are index of measurement for that scan.
 
   A valid hypothesis is a combination of rows of b (a combination of
   track-tree paths), such that the same measurement is not repeated.
 
   Solution vector "x" is 0|1 array that selects a set of track-tree-paths.
 
   Objective is to find the hypothesis that maximizes total score.

--------------------------------------------------------------------------
   Form:
   d = TOMHTAssignment( trk, M, glpkParams );
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   trk         (.)       Data structure array of track information
                         From this data we will obtain:
   b           (nT,nS)   Matrix of measurement IDs across scans
   trackScores (1,nT)    Array of total track scores
   treeIDs     (1,nT)    Array of track ID numbers. A common ID across
                             multiple tracks means they are in the same
                             track-tree.
   M           (1,1)     Number of hypotheses to generate. 
   glpkParams  (.)       Data structure with glpk parameters.

   -------
   Outputs
   -------
   d           (.)   Data structure with fields:
                     .nT     Number of tracks
                     .nS     Number of scans
                     .M      Number of hypotheses
                     .pairs  Pairs of hypotheses for score constraints
                     .nPairs Number of pairs
                     .A      Constraint matrix for optimization
                     .b      Constraint vector for optimization
                     .c      Cost vector for optimization
                     .lb     lower bounds on solution vector
                     .ub     upper bounds on solution vector
                     .conType  Constraint type array
                     .varType  Variable type array
                     .x        Solution vector for optimization
                     .hypothesis(:)  Array of hypothesis data, see below
   
   d.hypothesis(:)   Data structure array with fields:
                     .treeID       Vector of track-tree IDs in hypothesis
                     .trackIndex   Vector of track indices in hypothesis.
                                   Maps to rows of "b" matrix.
                     .tracks       Set of tracks in hypothesis. These are
                                   the selected rows of "b" matrix.
                     .trackScores  Vector of scores for selected tracks.
                     .score        Total score for hypothesis.

--------------------------------------------------------------------------
   Reference: Blackman, S. and R. Popoli, "Design and Analysis of  Modern
              Tracking Systems," Artech House, 1999.
--------------------------------------------------------------------------

Children:

Common: Graphics/MLog
MHT: glpk/glpk
MHT: Utilities/MHTTrkToB