Link to runnable program and program requirements/specs:
https://github.com/edgr-sanchez/CSCE2110-Graph
I've thus far implemented 95% of the program. Everything runs properly and has been tested using the provided test file.
The only thing that I'm having trouble implementing is Kruskal's Algorithm, and this is because I'm not quite sure how I need to use my existing data structure to pass it through Kruskal's.
To clarify a few things: Running Kruskal's Algorithm in this program is not supposed to make changes to the existing data, it should only calculate the minimum spanning tree and print it out.
Running the kruskal command on my program should output the minimum spanning tree in adjacency list format including the street name (S##) and the distance, like this:
NH NK(S02,11) NP(S03,13)
NK NH(S02,11) NL(S01,24)
NL NK(S01,24)
NM NW(S05,15)
NP NH(S03,13) NW(S07,12)
NW NM(S05,15) NP(S07,12)
The location where I need to implement this is in /src/SanE_10_P3_AdjacencyMatrix.cpp line 208.
Anyways, I'm providing my code and all this information to help you understand my code. I do not expect it to be written for me. I'd love to simply have some guidance on how to implement this using my existing struct:
struct {
bool exists = false;
std::string name = "";
int distance = empty;
} node[MAXNODES][MAXNODES];
This is the current output as well as the remaining expected output:
https://i.sstatic.net/Gv8D4.png
Thanks in advance!