map object and save it away in a data member.
<p>&nbsp;
<pre>
  template &lt;class PredecessorMap&gt;
  class record_predecessors : public dijkstra_visitor&lt;&gt;
  {
  public:
    record_predecessors(PredecessorMap p)
      : m_predecessor(p) { }

    template &lt;class Edge, class Graph&gt;
    void edge_relaxed(Edge e, Graph&amp; g) {
      // set the parent of the target(e) to source(e)
      put(m_predecessor, target(e, g), source(e, g));
    }
  protected:
    PredecessorMap m_predecessor;
  };
</pre