MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / ConvertToAML

Method ConvertToAML

graph_implement.cpp:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385AMLGraph* ALGraph::ConvertToAML(){
386 AMLGraph *converted = new AMLGraph(type);
387 for(int i = 0; i < vexList.size(); i++){
388 converted->AddVex(vexList[i].info);
389 }
390 for(int i = 0; i < vexList.size(); i++){
391 ALArc *p = vexList[i].firstArc;
392 while(p != nullptr){
393 if(type == DG || (type == UDG && i == GetIdOf(p->gArc->edVex())))
394 converted->AddArc(p->gArc, p->weight);
395 p = p->nextArc;
396 }
397 }
398 return converted;
399}
400
401/**************************************************************************************/
402

Callers 1

CreateSettingsMethod · 0.80

Calls 3

AddVexMethod · 0.80
edVexMethod · 0.80
AddArcMethod · 0.80

Tested by

no test coverage detected