| 1005 | } |
| 1006 | |
| 1007 | ALGraph* AMLGraph::ConvertToAL(){ |
| 1008 | ALGraph *converted = new ALGraph(type); |
| 1009 | for(int i = 0; i < outVexList.size(); i++) |
| 1010 | converted->AddVex(outVexList[i].info); |
| 1011 | for(int i = 0; i < outVexList.size(); i++){ |
| 1012 | AMLArc *p = outVexList[i].firstArc; |
| 1013 | while(p != nullptr){ |
| 1014 | if(p->outVexID == i) |
| 1015 | converted->AddArc(p->gArc); |
| 1016 | p = p->outVexID == i ? p->nextOutArc : p->nextInArc; |
| 1017 | } |
| 1018 | } |
| 1019 | return converted; |
| 1020 | } |
no test coverage detected