Definition at line 36 of file BoostedGraph.h. References addNode(), ConnectNode(), and nodes. 00036 { 00037 map<string, vector<string> >::iterator iter; 00038 for(iter = labels.begin(); iter != labels.end(); iter++) { 00039 string label = iter->first; 00040 if(nodes.count(label) == 0) addNode(label); 00041 for(uint i = 0; i < iter->second.size(); i++) { 00042 string related = iter->second[i]; 00043 if(nodes.count(related) == 0) addNode(related); 00044 ConnectNode(label, related); 00045 } 00046 } 00047 00048 if(labels.begin()->first.compare("obama") == 0) { 00049 ConnectNode("election", "president"); ConnectNode("barack", "barackobama"); 00050 ConnectNode("vote", "election"); ConnectNode("president", "politics"); 00051 ConnectNode("vote", "president"); ConnectNode("president", "obama"); 00052 ConnectNode("change", "hope"); ConnectNode("campaign", "election"); 00053 } 00054 }
Here is the call graph for this function:
|