35 std::ostringstream err;
38 std::string suffix(fn_suffix);
39 if (suffix.empty())
return 0;
40 if (suffix ==
"DFS")
return 1;
41 if (suffix ==
"BFS")
return 2;
42 if (suffix ==
"DD")
return 1;
43 err <<
"Unknown function suffix" << suffix;
44 *err_msg =
pgr_msg(err.str().c_str());
45 }
catch (std::exception &except) {
47 *err_msg =
pgr_msg(err.str().c_str());
54 get_name(
int fn_id,
char * fn_suffix,
char ** err_msg) {
55 std::ostringstream err;
60 case 0: name =
"pgr_kruskal";
62 case 1: name =
"pgr_prim";
64 default : name =
"unknown";
65 err <<
"Unknown function name";
66 *err_msg =
pgr_msg(err.str().c_str());
68 std::string suffix(fn_suffix);
70 char * full_name =
pgr_msg(name.c_str());
72 }
catch (std::exception &except) {
74 *err_msg =
pgr_msg(err.str().c_str());