Posts

Showing posts with the label Sedgewick

Modeling networks as graphs in C++

After playing around with some graph algorithm code as implemented by Sedgewick and others, I have come to the conclusion that while these are efficient and concise, improvements could be made to their usability.

Implementing Dijkstra’s Algorithm using Sedgewick's C++ Code

Image
Introduction Dijkstra's algorithm solves the shortest path problem for a graph with nonnegative edge weights, producing a shortest path tree. This algorithm is often used in routing and as a subroutine in other graph algorithms, the k-shortest paths algorithm, for example.