00001 #ifndef mmn_parse_arcs_h_ 00002 #define mmn_parse_arcs_h_ 00003 //: 00004 // \file 00005 // \brief Parse in a set of arc definitions using names of nodes 00006 // \author Martin Roberts 00007 00008 #include <mmn/mmn_arc.h> 00009 #include <vcl_istream.h> 00010 #include <vcl_vector.h> 00011 00012 // Expects "{ arc: { name1 name2 } arc: { name3 name 4 } }" 00013 //Format 00014 // \code 00015 // arcs: 00016 // { 00017 // arc: { LeftEye RightEye } 00018 // arc: { Nostrils Mouth } 00019 // arc: { LeftEyeBrow LeftEye } 00020 // arc: { RightEyeBrow RightEye } 00021 // } 00022 // \endcode 00023 //Note separating white space is needed after { and before } in arc definitions 00024 //Assumes names in node_names are in order of associated node numbers in 00025 //graph defined by these arcs 00026 // 00027 void mmn_parse_arcs(vcl_istream& is, 00028 const vcl_vector<vcl_string>& node_names, 00029 vcl_vector<mmn_arc>& arcs); 00030 00031 #endif // mmn_parse_arcs_h_ 00032