54 else if ( dist < distlabel )
85 std::cout <<
"LabelPosition for feat: " << lPos[0]->
feature->uid << std::endl;
88 for ( i = 0; i < nblp; i++ )
97 double cost_max = lPos[0]->
getCost();
98 double cost_min = lPos[max_p-1]->
getCost();
100 cost_max -= cost_min;
104 normalizer = 0.0020 / cost_max;
113 for ( i = 0; i < max_p; i++ )
116 std::cout <<
" lpos[" << i <<
"] = " << lPos[i]->
cost;
121 lPos[i]->
cost = 0.0021 - ( lPos[i]->
getCost() - cost_min ) * normalizer;
126 lPos[i]->
cost = 0.0001;
130 std::cout <<
" ==> " << lPos[i]->
cost << std::endl;
167 if ( max_p > feat->
nblp )
174 double discrim = 0.0;
179 for ( stop = 0; stop < feat->
nblp && feat->
lPos[stop]->
getCost() < discrim; stop++ )
182 while ( stop == 0 && discrim < feat->lPos[feat->
nblp-1]->getCost() + 2.0 );
187 for ( k = 0; k < stop; k++ )
219 px = ( lp->
x[0] + lp->
x[2] ) / 2.0;
220 py = ( lp->
y[0] + lp->
y[2] ) / 2.0;
229 pset->
getDist( px, py, &rx, &ry );