deploy/DeepStream/src/Lapjv.cpp
// Scan all columns in TODO starting from arbitrary column in SCAN
// and try to decrease d of the TODO columns using the SCAN column.
Scan all columns in TODO starting from arbitrary column in SCAN
and try to decrease d of the TODO columns using the SCAN column.
Scan all columns in TODO starting from arbitrary column in SCAN and try to decrease d of the TODO columns using the SCAN column .
int_t _scan_dense(const uint_t n, cost_t *cost[],
                  uint_t *plo, uint_t *phi,
                  cost_t *d, int_t *cols, int_t *pred,
                  int_t *y, cost_t *v) {
    uint_t lo = *plo;
    uint_t hi = *phi;
    cost_t h, cred_ij;
    while (lo != hi) {
        int_t        j    = cols[lo++];
        const int_t  i    = y[j];
        const cost_t mind = d[j];
        h = cost[i][j] - v[j] - mind;
        PRINTF("i=%d j=%d h=%f\n", i, j, h);
        for (uint_t k = hi; k < n; k++) {
            j       = cols[k];
            cred_ij = cost[i][j] - v[j] - h;
            if (cred_ij < d[j]) {
                d[j]    = cred_ij;
                pred[j] = i;
                if (cred_ij == mind) {
                    if (y[j] < 0) {
                        return j;
                    }
                    cols[k]    = cols[hi];
                    cols[hi++] = j;
                }
            }
        }
    }
    *plo = lo;
    *phi = hi;
    return -1;
}
int_t _scan_dense ( const uint_t n , cost_t * cost [ ] , uint_t * plo , uint_t * phi , cost_t * d , int_t * cols , int_t * pred , int_t * y , cost_t * v ) { uint_t lo = * plo ; uint_t hi = * phi ; cost_t h , cred_ij ; while ( lo != hi ) { int_t j = cols [ lo ++ ] ; const int_t i = y [ j ] ; const cost_t mind = d [ j ] ; h = cost [ i ] [ j ] - v [ j ] - mind ; PRINTF ( " \n " , i , j , h ) ; for ( uint_t k = hi ; k < n ; k ++ ) { j = cols [ k ] ; cred_ij = cost [ i ] [ j ] - v [ j ] - h ; if ( cred_ij < d [ j ] ) { d [ j ] = cred_ij ; pred [ j ] = i ; if ( cred_ij == mind ) { if ( y [ j ] < 0 ) { return j ; } cols [ k ] = cols [ hi ] ; cols [ hi ++ ] = j ; } } } } * plo = lo ; * phi = hi ; return -1 ; }
Scan all columns in TODO starting from arbitrary column in SCAN
and try to decrease d of the TODO columns using the SCAN column.
Scan all columns in TODO starting from arbitrary column in SCAN and try to decrease d of the TODO columns using the SCAN column .
// For all columns in TODO