Lines Matching defs:cost

87     float **cost;
120 const float* cost, int cost_step,
124 static CvStatus icvFindBasicVariables( float **cost, char **is_x,
127 static float icvIsOptimal( float **cost, char **is_x,
175 CvMat cost_stub, *cost = &cost_stub;
207 cost->data.fl = 0;
208 cost->step = 0;
216 "Only one of cost matrix or distance function should be non-NULL in case of user-defined distance" );
220 "The lower boundary can not be calculated if the cost matrix is used" );
222 CV_CALL( cost = cvGetMat( cost_matrix, &cost_stub ));
223 if( cost->rows != size1 || cost->cols != size2 )
225 "The cost matrix size does not match to the signatures' sizes" );
227 if( CV_MAT_TYPE( cost->type ) != CV_32FC1 )
228 CV_ERROR( CV_StsUnsupportedFormat, "The cost matrix must be 32fC1" );
258 cost->data.fl, cost->step,
278 result = icvFindBasicVariables( state.cost, state.is_x,
284 min_delta = icvIsOptimal( state.cost, state.is_x,
313 total_cost += (double)val * state.cost[i][j];
337 const float* cost, int cost_step,
354 buffer_size = (size1+1) * (size2+1) * (sizeof( float ) + /* cost */
363 sizeof( float * )) + 256; /* cost, is_x and delta */
430 /* if supply different than the demand, add a zero-cost dummy cluster */
501 /* init cost matrix */
502 state->cost = (float **) buffer;
510 state->cost[i] = (float *) buffer;
519 state->cost[i][j] = 0;
531 assert( cost );
532 val = cost[cost_step*ci + cj];
534 state->cost[i][j] = val;
543 state->cost[i][j] = 0;
586 icvFindBasicVariables( float **cost, char **is_x,
640 cur_u->val = cost[i][j] - cur_v_val;
669 _cost = cost[i];
711 icvIsOptimal( float **cost, char **is_x,
721 float *_cost = cost[i];
918 float **cost = state->cost;
941 float *cost_row = cost[i];
960 float *cost_row = cost[i];
1000 /* add x[min_i][min_j] to the basis, and adjust supplies and cost */
1010 if( cur_v->val == cost[min_i][j] ) /* column j needs updating */
1017 float temp = cost[cur_u - u][j];
1039 if( cur_u->val == cost[i][min_j] ) /* row i needs updating */
1046 float temp = cost[i][cur_v - v];