Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > d9faa203c2b0b6fbb179d93daaea81b7 > files > 1214

libdtn-devel-2.6.0-1mdv2009.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>DTN Reference Implementation: dtn::MultiGraph&lt; _NodeInfo, _EdgeInfo &gt; Class Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1MultiGraph.html">MultiGraph</a>
  </div>
</div>
<div class="contents">
<h1>dtn::MultiGraph&lt; _NodeInfo, _EdgeInfo &gt; Class Template Reference</h1><!-- doxytag: class="dtn::MultiGraph" --><code>#include &lt;<a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>&gt;</code>
<p>

<p>
<a href="classdtn_1_1MultiGraph-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename _NodeInfo, typename _EdgeInfo&gt;<br>
 class dtn::MultiGraph&lt; _NodeInfo, _EdgeInfo &gt;</h3>

Data structure to represent a multigraph. 
<p>Definition at line <a class="el" href="MultiGraph_8h-source.html#l00035">35</a> of file <a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef oasys::InlineFormatter<br>
&lt; _EdgeInfo &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#8da89fa48b9c6ef76cf3f700f2300115">EdgeFormatter</a></td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#45465930b4c1e4be0f25ddc8ec3cc2c9">MultiGraph</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#45465930b4c1e4be0f25ddc8ec3cc2c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#1ff6ca466b1a3d0d3ba7e1c9e7e1c7b0">~MultiGraph</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#1ff6ca466b1a3d0d3ba7e1c9e7e1c7b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#c250f8c8d1b8970870067c6e73058ee9">add_node</a> (const std::string &amp;id, const _NodeInfo &amp;<a class="el" href="dtncat_8c.html#71f51a2e8cbe9a53031fa72596edc09f">info</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new node.  <a href="#c250f8c8d1b8970870067c6e73058ee9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#a9a0d61ec5663bc8954b0db5969b68f4">find_node</a> (const std::string &amp;id) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find a node with the given id.  <a href="#a9a0d61ec5663bc8954b0db5969b68f4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#c6c2ee3ec320168b2399e3ae4a77936b">del_node</a> (const std::string &amp;id)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a node and all its edges.  <a href="#c6c2ee3ec320168b2399e3ae4a77936b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#059a319c2a8018b46b292b3dbc01ce8a">add_edge</a> (<a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *a, <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *b, const _EdgeInfo &amp;<a class="el" href="dtncat_8c.html#71f51a2e8cbe9a53031fa72596edc09f">info</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an edge.  <a href="#059a319c2a8018b46b292b3dbc01ce8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#45b321b90cabaab2d960b50bfa65f3ab">find_edge</a> (const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *a, const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *b, const _EdgeInfo &amp;<a class="el" href="dtncat_8c.html#71f51a2e8cbe9a53031fa72596edc09f">info</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an edge.  <a href="#45b321b90cabaab2d960b50bfa65f3ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#32aff4a713436864c2f147c03393bbbe">del_edge</a> (<a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *node, <a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a> *edge)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove the specified edge from the given node, deleting the <a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html" title="The edge class.">Edge</a> object.  <a href="#32aff4a713436864c2f147c03393bbbe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#5d091d22c14ffe7c29ff7890d69c9f89">shortest_path</a> (const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *a, const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *b, <a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html">EdgeVector</a> *path, <a class="el" href="classdtn_1_1MultiGraph_1_1WeightFn.html">WeightFn</a> *weight_fn, <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle=NULL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the shortest path between two nodes by running Dijkstra's algorithm, filling in the edge vector with the best path.  <a href="#5d091d22c14ffe7c29ff7890d69c9f89"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#05257dfbccf2c15813faef76b0a8ff6c">best_next_hop</a> (const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *a, const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *b, <a class="el" href="classdtn_1_1MultiGraph_1_1WeightFn.html">WeightFn</a> *weight_fn, <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle=NULL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More limited version of the shortest path that just returns the next hop edge.  <a href="#05257dfbccf2c15813faef76b0a8ff6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#8b4f62ab231dd63ea2fe3c45d59ead17">clear</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear the contents of the graph.  <a href="#8b4f62ab231dd63ea2fe3c45d59ead17"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#70aafb526a9df1513b7683549261ec47">format</a> (char *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, size_t sz) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual from Formatter.  <a href="#70aafb526a9df1513b7683549261ec47"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#6d2fd66634cd1087df9f6554abbf107a">dump</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a string dump of the graph.  <a href="#6d2fd66634cd1087df9f6554abbf107a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classdtn_1_1MultiGraph_1_1NodeVector.html">NodeVector</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#105482907b76044f8faa3720c8c97c4c">nodes</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor for the nodes array.  <a href="#105482907b76044f8faa3720c8c97c4c"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static u_int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#681a67ccaac7566e4f38ab36cf35d428">NodeDistance</a> (const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *n)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">XXX/demmer this stupid helper function is needed because <a class="el" href="structdtn_1_1MultiGraph_1_1DijkstraCompare.html" title="Helper class to compute Dijkstra distance.">DijkstraCompare</a> can't be made a friend class of <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html" title="The node class.">Node</a> without crashing gcc 3.4.  <a href="#681a67ccaac7566e4f38ab36cf35d428"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#634989e9fdaa33497ebd44bf3dcb2f95">get_reverse_path</a> (const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *a, const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *b, <a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html">EdgeVector</a> *path)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper function to follow the prev_ links that result from a Dijkstra search from a to b and build an <a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html" title="Helper data structure for a vector of edges.">EdgeVector</a>.  <a href="#634989e9fdaa33497ebd44bf3dcb2f95"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1MultiGraph_1_1NodeVector.html">NodeVector</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph.html#a195b6b49cc23c6af28dd923260b0641">nodes_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The vector of all nodes.  <a href="#a195b6b49cc23c6af28dd923260b0641"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdtn_1_1MultiGraph_1_1DijkstraCompare.html">DijkstraCompare</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper class to compute Dijkstra distance.  <a href="structdtn_1_1MultiGraph_1_1DijkstraCompare.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The edge class.  <a href="classdtn_1_1MultiGraph_1_1Edge.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html">EdgeVector</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper data structure for a vector of edges.  <a href="classdtn_1_1MultiGraph_1_1EdgeVector.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The node class.  <a href="classdtn_1_1MultiGraph_1_1Node.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph_1_1NodeVector.html">NodeVector</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper data structure for a vector of nodes.  <a href="classdtn_1_1MultiGraph_1_1NodeVector.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdtn_1_1MultiGraph_1_1SearchInfo.html">SearchInfo</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Struct used to encapsulate state that may be needed by weight functors and which is the same for a whole shortest path computation.  <a href="structdtn_1_1MultiGraph_1_1SearchInfo.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MultiGraph_1_1WeightFn.html">WeightFn</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The abstract weight function class.  <a href="classdtn_1_1MultiGraph_1_1WeightFn.html#_details">More...</a><br></td></tr>
</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="8da89fa48b9c6ef76cf3f700f2300115"></a><!-- doxytag: member="dtn::MultiGraph::EdgeFormatter" ref="8da89fa48b9c6ef76cf3f700f2300115" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef oasys::InlineFormatter&lt;_EdgeInfo&gt; <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::<a class="el" href="classdtn_1_1MultiGraph.html#8da89fa48b9c6ef76cf3f700f2300115">EdgeFormatter</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="MultiGraph_8h-source.html#l00201">201</a> of file <a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>.</p>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="45465930b4c1e4be0f25ddc8ec3cc2c9"></a><!-- doxytag: member="dtn::MultiGraph::MultiGraph" ref="45465930b4c1e4be0f25ddc8ec3cc2c9" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::<a class="el" href="classdtn_1_1MultiGraph.html">MultiGraph</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>

</div>
</div><p>
<a class="anchor" name="1ff6ca466b1a3d0d3ba7e1c9e7e1c7b0"></a><!-- doxytag: member="dtn::MultiGraph::~MultiGraph" ref="1ff6ca466b1a3d0d3ba7e1c9e7e1c7b0" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::~<a class="el" href="classdtn_1_1MultiGraph.html">MultiGraph</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="c250f8c8d1b8970870067c6e73058ee9"></a><!-- doxytag: member="dtn::MultiGraph::add_node" ref="c250f8c8d1b8970870067c6e73058ee9" args="(const std::string &amp;id, const _NodeInfo &amp;info)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a>* <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::add_node           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const _NodeInfo &amp;&nbsp;</td>
          <td class="paramname"> <em>info</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a new node. 
<p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00316">dtn::DTLSRRouter::handle_contact_up()</a>, <a class="el" href="DTLSRRouter_8cc-source.html#l00720">dtn::DTLSRRouter::handle_lsa()</a>, <a class="el" href="DTLSRRouter_8cc-source.html#l00425">dtn::DTLSRRouter::handle_registration_added()</a>, and <a class="el" href="DTLSRRouter_8cc-source.html#l00183">dtn::DTLSRRouter::initialize()</a>.</p>

</div>
</div><p>
<a class="anchor" name="a9a0d61ec5663bc8954b0db5969b68f4"></a><!-- doxytag: member="dtn::MultiGraph::find_node" ref="a9a0d61ec5663bc8954b0db5969b68f4" args="(const std::string &amp;id) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a>* <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::find_node           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>id</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find a node with the given id. 
<p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00356">dtn::DTLSRRouter::handle_contact_down()</a>, <a class="el" href="DTLSRRouter_8cc-source.html#l00316">dtn::DTLSRRouter::handle_contact_up()</a>, <a class="el" href="DTLSRRouter_8cc-source.html#l00720">dtn::DTLSRRouter::handle_lsa()</a>, and <a class="el" href="DTLSRRouter_8cc-source.html#l00425">dtn::DTLSRRouter::handle_registration_added()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c6c2ee3ec320168b2399e3ae4a77936b"></a><!-- doxytag: member="dtn::MultiGraph::del_node" ref="c6c2ee3ec320168b2399e3ae4a77936b" args="(const std::string &amp;id)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::del_node           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>id</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete a node and all its edges. 
<p>

</div>
</div><p>
<a class="anchor" name="059a319c2a8018b46b292b3dbc01ce8a"></a><!-- doxytag: member="dtn::MultiGraph::add_edge" ref="059a319c2a8018b46b292b3dbc01ce8a" args="(Node *a, Node *b, const _EdgeInfo &amp;info)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a>* <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::add_edge           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const _EdgeInfo &amp;&nbsp;</td>
          <td class="paramname"> <em>info</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add an edge. 
<p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00316">dtn::DTLSRRouter::handle_contact_up()</a>, <a class="el" href="DTLSRRouter_8cc-source.html#l00720">dtn::DTLSRRouter::handle_lsa()</a>, and <a class="el" href="DTLSRRouter_8cc-source.html#l00425">dtn::DTLSRRouter::handle_registration_added()</a>.</p>

</div>
</div><p>
<a class="anchor" name="45b321b90cabaab2d960b50bfa65f3ab"></a><!-- doxytag: member="dtn::MultiGraph::find_edge" ref="45b321b90cabaab2d960b50bfa65f3ab" args="(const Node *a, const Node *b, const _EdgeInfo &amp;info)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a>* <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::find_edge           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const _EdgeInfo &amp;&nbsp;</td>
          <td class="paramname"> <em>info</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find an edge. 
<p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00316">dtn::DTLSRRouter::handle_contact_up()</a>, and <a class="el" href="DTLSRRouter_8cc-source.html#l00425">dtn::DTLSRRouter::handle_registration_added()</a>.</p>

</div>
</div><p>
<a class="anchor" name="32aff4a713436864c2f147c03393bbbe"></a><!-- doxytag: member="dtn::MultiGraph::del_edge" ref="32aff4a713436864c2f147c03393bbbe" args="(Node *node, Edge *edge)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::del_edge           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a> *&nbsp;</td>
          <td class="paramname"> <em>edge</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove the specified edge from the given node, deleting the <a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html" title="The edge class.">Edge</a> object. 
<p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00480">dtn::DTLSRRouter::remove_edge()</a>.</p>

</div>
</div><p>
<a class="anchor" name="5d091d22c14ffe7c29ff7890d69c9f89"></a><!-- doxytag: member="dtn::MultiGraph::shortest_path" ref="5d091d22c14ffe7c29ff7890d69c9f89" args="(const Node *a, const Node *b, EdgeVector *path, WeightFn *weight_fn, Bundle *bundle=NULL)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::shortest_path           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html">EdgeVector</a> *&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1WeightFn.html">WeightFn</a> *&nbsp;</td>
          <td class="paramname"> <em>weight_fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find the shortest path between two nodes by running Dijkstra's algorithm, filling in the edge vector with the best path. 
<p>
Optionally also takes a bundle to route from a to b 
</div>
</div><p>
<a class="anchor" name="05257dfbccf2c15813faef76b0a8ff6c"></a><!-- doxytag: member="dtn::MultiGraph::best_next_hop" ref="05257dfbccf2c15813faef76b0a8ff6c" args="(const Node *a, const Node *b, WeightFn *weight_fn, Bundle *bundle=NULL)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph_1_1Edge.html">Edge</a>* <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::best_next_hop           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1WeightFn.html">WeightFn</a> *&nbsp;</td>
          <td class="paramname"> <em>weight_fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More limited version of the shortest path that just returns the next hop edge. 
<p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00524">dtn::DTLSRRouter::recompute_routes()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8b4f62ab231dd63ea2fe3c45d59ead17"></a><!-- doxytag: member="dtn::MultiGraph::clear" ref="8b4f62ab231dd63ea2fe3c45d59ead17" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::clear           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clear the contents of the graph. 
<p>

</div>
</div><p>
<a class="anchor" name="70aafb526a9df1513b7683549261ec47"></a><!-- doxytag: member="dtn::MultiGraph::format" ref="70aafb526a9df1513b7683549261ec47" args="(char *buf, size_t sz) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::format           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>sz</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Virtual from Formatter. 
<p>

<p>Referenced by <a class="el" href="MultiGraph_8h-source.html#l00090">dtn::MultiGraph&lt; dtn::DTLSRRouter::NodeInfo, dtn::DTLSRRouter::EdgeInfo &gt;::dump()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6d2fd66634cd1087df9f6554abbf107a"></a><!-- doxytag: member="dtn::MultiGraph::dump" ref="6d2fd66634cd1087df9f6554abbf107a" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::dump           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a string dump of the graph. 
<p>

<p>Definition at line <a class="el" href="MultiGraph_8h-source.html#l00090">90</a> of file <a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="105482907b76044f8faa3720c8c97c4c"></a><!-- doxytag: member="dtn::MultiGraph::nodes" ref="105482907b76044f8faa3720c8c97c4c" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classdtn_1_1MultiGraph_1_1NodeVector.html">NodeVector</a>&amp; <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::nodes           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Accessor for the nodes array. 
<p>

<p>Definition at line <a class="el" href="MultiGraph_8h-source.html#l00098">98</a> of file <a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>.</p>

<p>Referenced by <a class="el" href="DTLSRRouter_8cc-source.html#l00524">dtn::DTLSRRouter::recompute_routes()</a>.</p>

</div>
</div><p>
<a class="anchor" name="681a67ccaac7566e4f38ab36cf35d428"></a><!-- doxytag: member="dtn::MultiGraph::NodeDistance" ref="681a67ccaac7566e4f38ab36cf35d428" args="(const Node *n)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">static u_int32_t <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::NodeDistance           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
XXX/demmer this stupid helper function is needed because <a class="el" href="structdtn_1_1MultiGraph_1_1DijkstraCompare.html" title="Helper class to compute Dijkstra distance.">DijkstraCompare</a> can't be made a friend class of <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html" title="The node class.">Node</a> without crashing gcc 3.4. 
<p>

<p>Definition at line <a class="el" href="MultiGraph_8h-source.html#l00166">166</a> of file <a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>.</p>

<p>Referenced by <a class="el" href="MultiGraph_8h-source.html#l00172">dtn::MultiGraph&lt; _NodeInfo, _EdgeInfo &gt;::DijkstraCompare::operator()()</a>.</p>

</div>
</div><p>
<a class="anchor" name="634989e9fdaa33497ebd44bf3dcb2f95"></a><!-- doxytag: member="dtn::MultiGraph::get_reverse_path" ref="634989e9fdaa33497ebd44bf3dcb2f95" args="(const Node *a, const Node *b, EdgeVector *path)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::get_reverse_path           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1MultiGraph_1_1Node.html">Node</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html">EdgeVector</a> *&nbsp;</td>
          <td class="paramname"> <em>path</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Helper function to follow the prev_ links that result from a Dijkstra search from a to b and build an <a class="el" href="classdtn_1_1MultiGraph_1_1EdgeVector.html" title="Helper data structure for a vector of edges.">EdgeVector</a>. 
<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="a195b6b49cc23c6af28dd923260b0641"></a><!-- doxytag: member="dtn::MultiGraph::nodes_" ref="a195b6b49cc23c6af28dd923260b0641" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _NodeInfo, typename _EdgeInfo&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1MultiGraph_1_1NodeVector.html">NodeVector</a> <a class="el" href="classdtn_1_1MultiGraph.html">dtn::MultiGraph</a>&lt; _NodeInfo, _EdgeInfo &gt;::<a class="el" href="classdtn_1_1MultiGraph.html#a195b6b49cc23c6af28dd923260b0641">nodes_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The vector of all nodes. 
<p>

<p>Definition at line <a class="el" href="MultiGraph_8h-source.html#l00236">236</a> of file <a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a>.</p>

<p>Referenced by <a class="el" href="MultiGraph_8h-source.html#l00098">dtn::MultiGraph&lt; dtn::DTLSRRouter::NodeInfo, dtn::DTLSRRouter::EdgeInfo &gt;::nodes()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="MultiGraph_8h-source.html">MultiGraph.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:54 2008 for DTN Reference Implementation by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>