| 222 | } |
| 223 | |
| 224 | void ALGraph::ResetDistance(){ |
| 225 | for(int i = 0; i < vexList.size(); i++){ |
| 226 | vexList[i].info->strtVexInfo = nullptr; |
| 227 | vexList[i].info->distance = VexInfo::INF; |
| 228 | vexList[i].info->preVexID = -1; |
| 229 | vexList[i].info->gVex->access("", false); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | void ALGraph::DFS(int strtID, bool generateForest){ |
| 234 | if(strtID == -1) |