double max_AMS(int ft) { double sc,bc,th,a,maxa; //,maxth; int r; maxa=0; for(th=0;th<1;th+=0.01) { sc=0; bc=0; for(r=0;r<ROWS[ft];r++) { if(predt[r]>th) { if(y[r]==1) { sc += w[r]; } else { bc += w[r]; } } } a=AMS(sc,bc); if(a>maxa) { maxa=a; // maxth=th; } } return maxa; }
int main(int argc,char** argv) { ros::init(argc,argv,"Analyze_Map"); Analyze_Map_Server AMS(ros::this_node::getName()); ros::spin(); return 0; }