Home | History | Annotate | Download | only in src

Lines Matching full:cost

87     float **cost;
120 const float* cost, int cost_step,
124 static int icvFindBasicVariables( float **cost, char **is_x,
127 static float icvIsOptimal( float **cost, char **is_x,
169 CvMat cost_stub, *cost = &cost_stub;
201 cost->data.fl = 0;
202 cost->step = 0;
210 "Only one of cost matrix or distance function should be non-NULL in case of user-defined distance" );
214 "The lower boundary can not be calculated if the cost matrix is used" );
216 cost = cvGetMat( cost_matrix, &cost_stub );
217 if( cost->rows != size1 || cost->cols != size2 )
219 "The cost matrix size does not match to the signatures' sizes" );
221 if( CV_MAT_TYPE( cost->type ) != CV_32FC1 )
222 CV_Error( CV_StsUnsupportedFormat, "The cost matrix must be 32fC1" );
252 cost->data.fl, cost->step,
271 result = icvFindBasicVariables( state.cost, state.is_x,
277 min_delta = icvIsOptimal( state.cost, state.is_x,
309 total_cost += (double)val * state.cost[i][j];
326 const float* cost, int cost_step,
343 buffer_size = (size1+1) * (size2+1) * (sizeof( float ) + /* cost */
352 sizeof( float * )) + 256; /* cost, is_x and delta */
410 /* if supply different than the demand, add a zero-cost dummy cluster */
481 /* init cost matrix */
482 state->cost = (float **) buffer;
490 state->cost[i] = (float *) buffer;
499 state->cost[i][j] = 0;
511 assert( cost );
512 val = cost[cost_step*ci + cj];
514 state->cost
523 state->cost[i][j] = 0;
565 static int icvFindBasicVariables( float **cost, char **is_x,
619 cur_u->val = cost[i][j] - cur_v_val;
648 _cost = cost[i];
688 icvIsOptimal( float **cost, char **is_x,
698 float *_cost = cost[i];
895 float **cost = state->cost;
918 float *cost_row = cost[i];
937 float *cost_row = cost[i];
977 /* add x[min_i][min_j] to the basis, and adjust supplies and cost */
987 if( cur_v->val == cost[min_i][j] ) /* column j needs updating */
994 float temp = cost[cur_u - u][j];
1016 if( cur_u->val == cost[i][min_j] ) /* row i needs updating */
1023 float temp = cost[i][cur_v - v];
1146 Mat cost = _cost.getMat(), flow;
1150 CvMat _ccost = cost, _cflow;
1159 return cvCalcEMD2( &_csignature1, &_csignature2, distType, 0, cost.empty() ? 0 : &_ccost,