| 926 | } |
| 927 | |
| 928 | bool |
| 929 | Probabilities::parse_configuration(std::string &error_msg, const string &fname) |
| 930 | { |
| 931 | ifstream conf(fname.c_str()); |
| 932 | if (!conf.is_open()) { |
| 933 | error_msg = "fail to open probabilities configuration file!"; |
| 934 | return false; |
| 935 | } |
| 936 | |
| 937 | std::string line; |
| 938 | while(!conf.eof()) { |
| 939 | getline(conf, line); |
| 940 | if (StringUtils::empty_line(line)) |
| 941 | continue; |
| 942 | if (!parse_line(error_msg, line)) |
| 943 | return false; |
| 944 | } |
| 945 | conf.close(); |
| 946 | //dump_actual_probabilities(); |
| 947 | return true; |
| 948 | } |
| 949 | |
| 950 | bool |
| 951 | Probabilities::setup_group_probabilities(bool is_equal, const vector<string> &elems) |
no outgoing calls
no test coverage detected