convert a string vector into a double vector. If a string is empty or "--", it will be converted to be NANUM, else will get corresponding numeric value.
int convert_str_vector_to_num_vector( const vector<string> & vs, vector<double> & vd )
the number of converted strings.
EX1
int convert_str_vector_to_num_vector_ex1() { vector<string> vs = {"13.3","412342.234123e5","1234.3","aa"}; vector<double> vd; int iRet=convert_str_vector_to_num_vector(vs,vd); for (int ii=0; ii<iRet; ii++) printf("%f\n",vd[ii]); return 0; }
convert_double_vector_to_string_vector, convert_tree_double_vector_to_str_vector
origin.h