title: Make Boost Dijkstra algorithm stop when it reaches a destination node
body: <p>I'm using boost::graph and its Dijkstra implementation.</p>
  
  <p>When someone is using the Dijkstra algorithm, it may be to know the shortest path between 2 nodes in a graph. But as you need to check all nodes in the graph to find the shortest path, usually (like the boost algorithm) Dijkstra gives you back all the distances between one origin point, and all the other nodes of the graph.</p>
  
  <p>One easy improvement of this algorithm when you only want the path between 2 nodes is to stop it when the algorithm reach the destination node. Then, you are sure that the distance that you have for this final destination node is the shortest one.</p>
  
  <p>How can one tell the boost Dijkstra algorithm to stop when it reaches a specific node ?</p>