Where is the best place for the edge length in an adjacency list implementation? I use this site as a link . I think it’s put it in the edge of the node to find the length from one vertex to another, you go to one of the vertex nodes and find its connecting edges and get access to the corresponding member. (see Part 5: “Data Types for Implementation” on the linked page)
It seems to me that this sounds to me, but I have looked at many sites, and not one site confirms that this works. I also remember reading somewhere that it is much easier to implement lengths in adjacent matrices, but I did not stop to say whether it is even possible to implement lengths in adjacency lists or just more complicated.
source
share