1328 lines
77 KiB
HTML
1328 lines
77 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>OR-Tools</title>
|
|
<meta http-equiv="Content-Type" content="text/html;"/>
|
|
<meta charset="utf-8"/>
|
|
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
|
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">OR-Tools 7.1@</span>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<!-- Generated by Doxygen 1.8.15 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</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 id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespaceutil.html">util</a></li><li class="navelem"><a class="el" href="classutil_1_1ListGraph.html">ListGraph</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-attribs">Static Public Attributes</a> |
|
|
<a href="#pro-methods">Protected Member Functions</a> |
|
|
<a href="#pro-attribs">Protected Attributes</a> |
|
|
<a href="classutil_1_1ListGraph-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">util::ListGraph< NodeIndexType, ArcIndexType > Class Template Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Basic graph implementation without reverse arc.
|
|
<a href="classutil_1_1ListGraph.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="graph_8h_source.html">graph.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for util::ListGraph< NodeIndexType, ArcIndexType >:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classutil_1_1ListGraph__inherit__graph.png" border="0" usemap="#util_1_1ListGraph_3_01NodeIndexType_00_01ArcIndexType_01_4_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="util_1_1ListGraph_3_01NodeIndexType_00_01ArcIndexType_01_4_inherit__map" id="util_1_1ListGraph_3_01NodeIndexType_00_01ArcIndexType_01_4_inherit__map">
|
|
<area shape="rect" title="Basic graph implementation without reverse arc." alt="" coords="10,92,190,131"/>
|
|
<area shape="rect" href="classutil_1_1BaseGraph.html" title=" " alt="" coords="5,5,195,44"/>
|
|
</map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<div class="dynheader">
|
|
Collaboration diagram for util::ListGraph< NodeIndexType, ArcIndexType >:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classutil_1_1ListGraph__coll__graph.png" border="0" usemap="#util_1_1ListGraph_3_01NodeIndexType_00_01ArcIndexType_01_4_coll__map" alt="Collaboration graph"/></div>
|
|
<map name="util_1_1ListGraph_3_01NodeIndexType_00_01ArcIndexType_01_4_coll__map" id="util_1_1ListGraph_3_01NodeIndexType_00_01ArcIndexType_01_4_coll__map">
|
|
<area shape="rect" title="Basic graph implementation without reverse arc." alt="" coords="40,207,219,245"/>
|
|
<area shape="rect" href="classutil_1_1BaseGraph.html" title=" " alt="" coords="35,119,224,157"/>
|
|
<area shape="rect" title=" " alt="" coords="5,5,120,31"/>
|
|
<area shape="rect" title=" " alt="" coords="145,5,247,31"/>
|
|
</map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph_1_1OutgoingArcIterator.html">OutgoingArcIterator</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph_1_1OutgoingHeadIterator.html">OutgoingHeadIterator</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:adb271cf4bcf2de5b5bbe300d7054af29"><td class="memItemLeft" align="right" valign="top">typedef NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#adb271cf4bcf2de5b5bbe300d7054af29">NodeIndex</a></td></tr>
|
|
<tr class="memdesc:adb271cf4bcf2de5b5bbe300d7054af29"><td class="mdescLeft"> </td><td class="mdescRight">Typedef so you can use Graph::NodeIndex and Graph::ArcIndex to be generic but also to improve the readability of your code. <a href="#adb271cf4bcf2de5b5bbe300d7054af29">More...</a><br /></td></tr>
|
|
<tr class="separator:adb271cf4bcf2de5b5bbe300d7054af29"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0eba6e5899924388644dfa2258ae8929"><td class="memItemLeft" align="right" valign="top">typedef ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a0eba6e5899924388644dfa2258ae8929">ArcIndex</a></td></tr>
|
|
<tr class="separator:a0eba6e5899924388644dfa2258ae8929"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a4b5be895dae4a52e7bd97a7ef47267a6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#a4b5be895dae4a52e7bd97a7ef47267a6">ListGraph</a> ()</td></tr>
|
|
<tr class="separator:a4b5be895dae4a52e7bd97a7ef47267a6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a184d6ce1a3d943810039ac9b97b860ef"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#a184d6ce1a3d943810039ac9b97b860ef">ListGraph</a> (NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html#a0f551c921fa0b5aaa334a6e36f61db4a">num_nodes</a>, ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html#a92ffd852b2ab2e5241f9832e71a2de71">arc_capacity</a>)</td></tr>
|
|
<tr class="memdesc:a184d6ce1a3d943810039ac9b97b860ef"><td class="mdescLeft"> </td><td class="mdescRight">Reserve space for the graph at construction and do not allow it to grow beyond that, see <a class="el" href="classutil_1_1BaseGraph.html#aa3bd051d1e141b09dda17aa9b5f24f69" title="FreezeCapacities() makes any future attempt to change the graph capacities crash in DEBUG mode.">FreezeCapacities()</a>. <a href="#a184d6ce1a3d943810039ac9b97b860ef">More...</a><br /></td></tr>
|
|
<tr class="separator:a184d6ce1a3d943810039ac9b97b860ef"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6af38e88610400b54e8f28ab6f880908"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#a6af38e88610400b54e8f28ab6f880908">AddNode</a> (NodeIndexType node)</td></tr>
|
|
<tr class="memdesc:a6af38e88610400b54e8f28ab6f880908"><td class="mdescLeft"> </td><td class="mdescRight">If node is not a valid node, sets num_nodes_ to node + 1 so that the given node becomes valid. <a href="#a6af38e88610400b54e8f28ab6f880908">More...</a><br /></td></tr>
|
|
<tr class="separator:a6af38e88610400b54e8f28ab6f880908"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac1aa8c7591bb033a49bab79c21c9f496"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#ac1aa8c7591bb033a49bab79c21c9f496">AddArc</a> (NodeIndexType tail, NodeIndexType head)</td></tr>
|
|
<tr class="memdesc:ac1aa8c7591bb033a49bab79c21c9f496"><td class="mdescLeft"> </td><td class="mdescRight">Adds an arc to the graph and returns its current index which will always be <a class="el" href="classutil_1_1BaseGraph.html#aefb468e4d4a3128c91b3bad9f5b314c8" title="Returns the number of valid arcs in the graph.">num_arcs()</a> - 1. <a href="#ac1aa8c7591bb033a49bab79c21c9f496">More...</a><br /></td></tr>
|
|
<tr class="separator:ac1aa8c7591bb033a49bab79c21c9f496"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a777ff917f03a31da77f275d536578afa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa">Build</a> ()</td></tr>
|
|
<tr class="memdesc:a777ff917f03a31da77f275d536578afa"><td class="mdescLeft"> </td><td class="mdescRight">Some graph implementations need to be finalized with <a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa" title="Some graph implementations need to be finalized with Build() before they can be used.">Build()</a> before they can be used. <a href="#a777ff917f03a31da77f275d536578afa">More...</a><br /></td></tr>
|
|
<tr class="separator:a777ff917f03a31da77f275d536578afa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a55c0cd4ab76f4501d0a2b9bbdb308d00"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#a55c0cd4ab76f4501d0a2b9bbdb308d00">Build</a> (std::vector< ArcIndexType > *permutation)</td></tr>
|
|
<tr class="separator:a55c0cd4ab76f4501d0a2b9bbdb308d00"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac52db792129da62b7ab25372ab90647c"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#ac52db792129da62b7ab25372ab90647c">OutDegree</a> (NodeIndexType node) const</td></tr>
|
|
<tr class="memdesc:ac52db792129da62b7ab25372ab90647c"><td class="mdescLeft"> </td><td class="mdescRight">Graph jargon: the "degree" of a node is its number of arcs. <a href="#ac52db792129da62b7ab25372ab90647c">More...</a><br /></td></tr>
|
|
<tr class="separator:ac52db792129da62b7ab25372ab90647c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab63770fa993b9347586d2852b841bdc2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="iterators_8h.html#af3f6bc803bbe87af730cf9e41a35cf68">BeginEndWrapper</a>< <a class="el" href="classutil_1_1ListGraph_1_1OutgoingArcIterator.html">OutgoingArcIterator</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#ab63770fa993b9347586d2852b841bdc2">OutgoingArcs</a> (NodeIndexType node) const</td></tr>
|
|
<tr class="memdesc:ab63770fa993b9347586d2852b841bdc2"><td class="mdescLeft"> </td><td class="mdescRight">Allows to iterate over the forward arcs that verify Tail(arc) == node. <a href="#ab63770fa993b9347586d2852b841bdc2">More...</a><br /></td></tr>
|
|
<tr class="separator:ab63770fa993b9347586d2852b841bdc2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac52a095c1ebbd1ca89902168350bbb75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="iterators_8h.html#af3f6bc803bbe87af730cf9e41a35cf68">BeginEndWrapper</a>< <a class="el" href="classutil_1_1ListGraph_1_1OutgoingArcIterator.html">OutgoingArcIterator</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#ac52a095c1ebbd1ca89902168350bbb75">OutgoingArcsStartingFrom</a> (NodeIndexType node, ArcIndexType from) const</td></tr>
|
|
<tr class="memdesc:ac52a095c1ebbd1ca89902168350bbb75"><td class="mdescLeft"> </td><td class="mdescRight">Advanced usage. <a href="#ac52a095c1ebbd1ca89902168350bbb75">More...</a><br /></td></tr>
|
|
<tr class="separator:ac52a095c1ebbd1ca89902168350bbb75"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1565480b94bf179067e81d762916ed52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="iterators_8h.html#af3f6bc803bbe87af730cf9e41a35cf68">BeginEndWrapper</a>< <a class="el" href="classutil_1_1ListGraph_1_1OutgoingHeadIterator.html">OutgoingHeadIterator</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#a1565480b94bf179067e81d762916ed52">operator[]</a> (NodeIndexType node) const</td></tr>
|
|
<tr class="memdesc:a1565480b94bf179067e81d762916ed52"><td class="mdescLeft"> </td><td class="mdescRight">This loops over the heads of the OutgoingArcs(node). <a href="#a1565480b94bf179067e81d762916ed52">More...</a><br /></td></tr>
|
|
<tr class="separator:a1565480b94bf179067e81d762916ed52"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aba03f198f690155bca2ab23b039cea54"><td class="memItemLeft" align="right" valign="top">NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#aba03f198f690155bca2ab23b039cea54">Tail</a> (ArcIndexType arc) const</td></tr>
|
|
<tr class="memdesc:aba03f198f690155bca2ab23b039cea54"><td class="mdescLeft"> </td><td class="mdescRight">Returns the tail/head of a valid arc. <a href="#aba03f198f690155bca2ab23b039cea54">More...</a><br /></td></tr>
|
|
<tr class="separator:aba03f198f690155bca2ab23b039cea54"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad7d3d076d3c154d89f1eda855a34b487"><td class="memItemLeft" align="right" valign="top">NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#ad7d3d076d3c154d89f1eda855a34b487">Head</a> (ArcIndexType arc) const</td></tr>
|
|
<tr class="separator:ad7d3d076d3c154d89f1eda855a34b487"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aefd885a0eba3ec33568137533190ba5b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#aefd885a0eba3ec33568137533190ba5b">ReserveNodes</a> (NodeIndexType bound) override</td></tr>
|
|
<tr class="memdesc:aefd885a0eba3ec33568137533190ba5b"><td class="mdescLeft"> </td><td class="mdescRight">Changes the graph capacities. <a href="#aefd885a0eba3ec33568137533190ba5b">More...</a><br /></td></tr>
|
|
<tr class="separator:aefd885a0eba3ec33568137533190ba5b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af637e16c3c7604f0354a6fa317358a15"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1ListGraph.html#af637e16c3c7604f0354a6fa317358a15">ReserveArcs</a> (ArcIndexType bound) override</td></tr>
|
|
<tr class="separator:af637e16c3c7604f0354a6fa317358a15"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0f551c921fa0b5aaa334a6e36f61db4a"><td class="memItemLeft" align="right" valign="top">NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a0f551c921fa0b5aaa334a6e36f61db4a">num_nodes</a> () const</td></tr>
|
|
<tr class="memdesc:a0f551c921fa0b5aaa334a6e36f61db4a"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of valid nodes in the graph. <a href="#a0f551c921fa0b5aaa334a6e36f61db4a">More...</a><br /></td></tr>
|
|
<tr class="separator:a0f551c921fa0b5aaa334a6e36f61db4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aefb468e4d4a3128c91b3bad9f5b314c8"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#aefb468e4d4a3128c91b3bad9f5b314c8">num_arcs</a> () const</td></tr>
|
|
<tr class="memdesc:aefb468e4d4a3128c91b3bad9f5b314c8"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of valid arcs in the graph. <a href="#aefb468e4d4a3128c91b3bad9f5b314c8">More...</a><br /></td></tr>
|
|
<tr class="separator:aefb468e4d4a3128c91b3bad9f5b314c8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a32ba4a5ca9a4b89f750eb2dc56518b02"><td class="memItemLeft" align="right" valign="top">IntegerRange< <a class="el" href="classutil_1_1BaseGraph.html#adb271cf4bcf2de5b5bbe300d7054af29">NodeIndex</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a32ba4a5ca9a4b89f750eb2dc56518b02">AllNodes</a> () const</td></tr>
|
|
<tr class="memdesc:a32ba4a5ca9a4b89f750eb2dc56518b02"><td class="mdescLeft"> </td><td class="mdescRight">Allows nice range-based for loop: for (const NodeIndex node : graph.AllNodes()) { ... <a href="#a32ba4a5ca9a4b89f750eb2dc56518b02">More...</a><br /></td></tr>
|
|
<tr class="separator:a32ba4a5ca9a4b89f750eb2dc56518b02"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abcfd7c21143e5ed38573c0dd60826dd8"><td class="memItemLeft" align="right" valign="top">IntegerRange< <a class="el" href="classutil_1_1BaseGraph.html#a0eba6e5899924388644dfa2258ae8929">ArcIndex</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#abcfd7c21143e5ed38573c0dd60826dd8">AllForwardArcs</a> () const</td></tr>
|
|
<tr class="separator:abcfd7c21143e5ed38573c0dd60826dd8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abf853acea86e01356f53055f77661770"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#abf853acea86e01356f53055f77661770">IsNodeValid</a> (NodeIndexType node) const</td></tr>
|
|
<tr class="memdesc:abf853acea86e01356f53055f77661770"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the given node is a valid node of the graph. <a href="#abf853acea86e01356f53055f77661770">More...</a><br /></td></tr>
|
|
<tr class="separator:abf853acea86e01356f53055f77661770"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2097ccda3b1ad27e2c82166979018bda"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a2097ccda3b1ad27e2c82166979018bda">IsArcValid</a> (ArcIndexType arc) const</td></tr>
|
|
<tr class="memdesc:a2097ccda3b1ad27e2c82166979018bda"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the given arc is a valid arc of the graph. <a href="#a2097ccda3b1ad27e2c82166979018bda">More...</a><br /></td></tr>
|
|
<tr class="separator:a2097ccda3b1ad27e2c82166979018bda"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a463d57480c9563a7a707c5d0928c9946"><td class="memItemLeft" align="right" valign="top">NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a463d57480c9563a7a707c5d0928c9946">node_capacity</a> () const</td></tr>
|
|
<tr class="memdesc:a463d57480c9563a7a707c5d0928c9946"><td class="mdescLeft"> </td><td class="mdescRight">Capacity reserved for future nodes, always >= num_nodes_. <a href="#a463d57480c9563a7a707c5d0928c9946">More...</a><br /></td></tr>
|
|
<tr class="separator:a463d57480c9563a7a707c5d0928c9946"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a92ffd852b2ab2e5241f9832e71a2de71"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a92ffd852b2ab2e5241f9832e71a2de71">arc_capacity</a> () const</td></tr>
|
|
<tr class="memdesc:a92ffd852b2ab2e5241f9832e71a2de71"><td class="mdescLeft"> </td><td class="mdescRight">Capacity reserved for future arcs, always >= num_arcs_. <a href="#a92ffd852b2ab2e5241f9832e71a2de71">More...</a><br /></td></tr>
|
|
<tr class="separator:a92ffd852b2ab2e5241f9832e71a2de71"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab731ca5c638e7b1b0a2c459c94a90f55"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#ab731ca5c638e7b1b0a2c459c94a90f55">Reserve</a> (NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html#a463d57480c9563a7a707c5d0928c9946">node_capacity</a>, ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html#a92ffd852b2ab2e5241f9832e71a2de71">arc_capacity</a>)</td></tr>
|
|
<tr class="separator:ab731ca5c638e7b1b0a2c459c94a90f55"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa3bd051d1e141b09dda17aa9b5f24f69"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#aa3bd051d1e141b09dda17aa9b5f24f69">FreezeCapacities</a> ()</td></tr>
|
|
<tr class="memdesc:aa3bd051d1e141b09dda17aa9b5f24f69"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classutil_1_1BaseGraph.html#aa3bd051d1e141b09dda17aa9b5f24f69" title="FreezeCapacities() makes any future attempt to change the graph capacities crash in DEBUG mode.">FreezeCapacities()</a> makes any future attempt to change the graph capacities crash in DEBUG mode. <a href="#aa3bd051d1e141b09dda17aa9b5f24f69">More...</a><br /></td></tr>
|
|
<tr class="separator:aa3bd051d1e141b09dda17aa9b5f24f69"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a07214b96597069d781e27b1dd17ef83e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a07214b96597069d781e27b1dd17ef83e">GroupForwardArcsByFunctor</a> (const A &a, B *b)</td></tr>
|
|
<tr class="separator:a07214b96597069d781e27b1dd17ef83e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a346b8a5811f0e287e1ebce2de2c1ad28"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a346b8a5811f0e287e1ebce2de2c1ad28">max_end_arc_index</a> () const</td></tr>
|
|
<tr class="separator:a346b8a5811f0e287e1ebce2de2c1ad28"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
|
|
Static Public Attributes</h2></td></tr>
|
|
<tr class="memitem:ab1292c82a3f43be3bd57b63a05fe0214"><td class="memItemLeft" align="right" valign="top">static const NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#ab1292c82a3f43be3bd57b63a05fe0214">kNilNode</a></td></tr>
|
|
<tr class="memdesc:ab1292c82a3f43be3bd57b63a05fe0214"><td class="mdescLeft"> </td><td class="mdescRight">Constants that will never be a valid node or arc. <a href="#ab1292c82a3f43be3bd57b63a05fe0214">More...</a><br /></td></tr>
|
|
<tr class="separator:ab1292c82a3f43be3bd57b63a05fe0214"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad5b77846f77c2771e840820812ad5521"><td class="memItemLeft" align="right" valign="top">static const ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#ad5b77846f77c2771e840820812ad5521">kNilArc</a></td></tr>
|
|
<tr class="separator:ad5b77846f77c2771e840820812ad5521"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
|
|
Protected Member Functions</h2></td></tr>
|
|
<tr class="memitem:ac47030fcb75a3220f8cf9ed79697056e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#ac47030fcb75a3220f8cf9ed79697056e">ComputeCumulativeSum</a> (std::vector< ArcIndexType > *v)</td></tr>
|
|
<tr class="memdesc:ac47030fcb75a3220f8cf9ed79697056e"><td class="mdescLeft"> </td><td class="mdescRight">Functions commented when defined because they are implementation details. <a href="#ac47030fcb75a3220f8cf9ed79697056e">More...</a><br /></td></tr>
|
|
<tr class="separator:ac47030fcb75a3220f8cf9ed79697056e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a63fd586eed6c345866317e2f0faf377e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a63fd586eed6c345866317e2f0faf377e">BuildStartAndForwardHead</a> (<a class="el" href="classutil_1_1SVector.html">SVector</a>< NodeIndexType > *head, std::vector< ArcIndexType > *start, std::vector< ArcIndexType > *permutation)</td></tr>
|
|
<tr class="memdesc:a63fd586eed6c345866317e2f0faf377e"><td class="mdescLeft"> </td><td class="mdescRight">Given the tail of arc #i in (*head)[i] and the head of arc #i in (*head)[~i]. <a href="#a63fd586eed6c345866317e2f0faf377e">More...</a><br /></td></tr>
|
|
<tr class="separator:a63fd586eed6c345866317e2f0faf377e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
|
|
Protected Attributes</h2></td></tr>
|
|
<tr class="memitem:a473db46afec1eabf0762411830dee30f"><td class="memItemLeft" align="right" valign="top">NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a473db46afec1eabf0762411830dee30f">num_nodes_</a></td></tr>
|
|
<tr class="separator:a473db46afec1eabf0762411830dee30f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a424bd34a9767e7edeaf3a60ecd3cb000"><td class="memItemLeft" align="right" valign="top">NodeIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a424bd34a9767e7edeaf3a60ecd3cb000">node_capacity_</a></td></tr>
|
|
<tr class="separator:a424bd34a9767e7edeaf3a60ecd3cb000"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af16f99d41856a7b22ae8a226ef09abff"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#af16f99d41856a7b22ae8a226ef09abff">num_arcs_</a></td></tr>
|
|
<tr class="separator:af16f99d41856a7b22ae8a226ef09abff"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a895e891d1ad52ce3efcfeb7ba11194c7"><td class="memItemLeft" align="right" valign="top">ArcIndexType </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#a895e891d1ad52ce3efcfeb7ba11194c7">arc_capacity_</a></td></tr>
|
|
<tr class="separator:a895e891d1ad52ce3efcfeb7ba11194c7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa980e5526b9ded17a83928fc339c71e4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classutil_1_1BaseGraph.html#aa980e5526b9ded17a83928fc339c71e4">const_capacities_</a></td></tr>
|
|
<tr class="separator:aa980e5526b9ded17a83928fc339c71e4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><h3>template<typename NodeIndexType = int32, typename ArcIndexType = int32><br />
|
|
class util::ListGraph< NodeIndexType, ArcIndexType ></h3>
|
|
|
|
<p>Basic graph implementation without reverse arc. </p>
|
|
<p>This class also serves as a documentation for the generic graph interface (minus the part related to reverse arcs).</p>
|
|
<p>This implementation uses a linked list and compared to <a class="el" href="classutil_1_1StaticGraph.html" title="Most efficient implementation of a graph without reverse arcs:">StaticGraph</a>:</p><ul>
|
|
<li>Is a bit faster to construct (if the arcs are not ordered by tail).</li>
|
|
<li>Does not require calling <a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa" title="Some graph implementations need to be finalized with Build() before they can be used.">Build()</a>.</li>
|
|
<li>Has slower outgoing arc iteration.</li>
|
|
<li>Uses more memory: ArcIndexType * <a class="el" href="classutil_1_1BaseGraph.html#a463d57480c9563a7a707c5d0928c9946" title="Capacity reserved for future nodes, always >= num_nodes_.">node_capacity()</a><ul>
|
|
<li>(ArcIndexType + NodeIndexType) * <a class="el" href="classutil_1_1BaseGraph.html#a92ffd852b2ab2e5241f9832e71a2de71" title="Capacity reserved for future arcs, always >= num_arcs_.">arc_capacity()</a>.</li>
|
|
</ul>
|
|
</li>
|
|
<li>Has an efficient <a class="el" href="classutil_1_1ListGraph.html#aba03f198f690155bca2ab23b039cea54" title="Returns the tail/head of a valid arc.">Tail()</a> but need an extra NodeIndexType/arc memory for it.</li>
|
|
<li>Never changes the initial arc index returned by <a class="el" href="classutil_1_1ListGraph.html#ac1aa8c7591bb033a49bab79c21c9f496" title="Adds an arc to the graph and returns its current index which will always be num_arcs() - 1.">AddArc()</a>. </li>
|
|
</ul>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00297">297</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
<a id="a0eba6e5899924388644dfa2258ae8929"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0eba6e5899924388644dfa2258ae8929">◆ </a></span>ArcIndex</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::<a class="el" href="classutil_1_1BaseGraph.html#a0eba6e5899924388644dfa2258ae8929">ArcIndex</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00190">190</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adb271cf4bcf2de5b5bbe300d7054af29"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adb271cf4bcf2de5b5bbe300d7054af29">◆ </a></span>NodeIndex</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::<a class="el" href="classutil_1_1BaseGraph.html#adb271cf4bcf2de5b5bbe300d7054af29">NodeIndex</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Typedef so you can use <a class="el" href="classutil_1_1BaseGraph.html#adb271cf4bcf2de5b5bbe300d7054af29" title="Typedef so you can use Graph::NodeIndex and Graph::ArcIndex to be generic but also to improve the rea...">Graph::NodeIndex</a> and <a class="el" href="classutil_1_1BaseGraph.html#a0eba6e5899924388644dfa2258ae8929">Graph::ArcIndex</a> to be generic but also to improve the readability of your code. </p>
|
|
<p>We also recommend that you define a typedef ... Graph; for readability. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00189">189</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a4b5be895dae4a52e7bd97a7ef47267a6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4b5be895dae4a52e7bd97a7ef47267a6">◆ </a></span>ListGraph() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType = int32, typename ArcIndexType = int32> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::<a class="el" href="classutil_1_1ListGraph.html">ListGraph</a> </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00307">307</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a184d6ce1a3d943810039ac9b97b860ef"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a184d6ce1a3d943810039ac9b97b860ef">◆ </a></span>ListGraph() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType = int32, typename ArcIndexType = int32> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::<a class="el" href="classutil_1_1ListGraph.html">ListGraph</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>num_nodes</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>arc_capacity</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Reserve space for the graph at construction and do not allow it to grow beyond that, see <a class="el" href="classutil_1_1BaseGraph.html#aa3bd051d1e141b09dda17aa9b5f24f69" title="FreezeCapacities() makes any future attempt to change the graph capacities crash in DEBUG mode.">FreezeCapacities()</a>. </p>
|
|
<p>This constructor also makes any nodes in [0, num_nodes) valid. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00312">312</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="ac1aa8c7591bb033a49bab79c21c9f496"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac1aa8c7591bb033a49bab79c21c9f496">◆ </a></span>AddArc()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::AddArc </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>tail</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>head</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Adds an arc to the graph and returns its current index which will always be <a class="el" href="classutil_1_1BaseGraph.html#aefb468e4d4a3128c91b3bad9f5b314c8" title="Returns the number of valid arcs in the graph.">num_arcs()</a> - 1. </p>
|
|
<p>It will also automatically call AddNode(tail) and AddNode(head). It will fail in DEBUG mode if the capacities are fixed and this cause the graph to grow beyond them.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>Self referencing arcs and duplicate arcs are supported. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01137">1137</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6af38e88610400b54e8f28ab6f880908"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6af38e88610400b54e8f28ab6f880908">◆ </a></span>AddNode()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::AddNode </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>If node is not a valid node, sets num_nodes_ to node + 1 so that the given node becomes valid. </p>
|
|
<p>It will fail in DEBUG mode if the capacities are fixed and the new node is out of range. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01129">1129</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abcfd7c21143e5ed38573c0dd60826dd8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abcfd7c21143e5ed38573c0dd60826dd8">◆ </a></span>AllForwardArcs()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">IntegerRange< ArcIndexType > <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::AllForwardArcs </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00935">935</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a32ba4a5ca9a4b89f750eb2dc56518b02"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a32ba4a5ca9a4b89f750eb2dc56518b02">◆ </a></span>AllNodes()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">IntegerRange< NodeIndexType > <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::AllNodes </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allows nice range-based for loop: for (const NodeIndex node : graph.AllNodes()) { ... </p>
|
|
<p><a class="el" href="classutil_1_1BaseGraph.html" title="Base class of all Graphs implemented here.">BaseGraph</a> implementation -------------------------------------------------—.</p>
|
|
<p>} for (const ArcIndex arc : graph.AllForwardArcs()) { ... } </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00929">929</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a92ffd852b2ab2e5241f9832e71a2de71"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a92ffd852b2ab2e5241f9832e71a2de71">◆ </a></span>arc_capacity()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::arc_capacity </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Capacity reserved for future arcs, always >= num_arcs_. </p>
|
|
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000014">Todo:</a></b></dt><dd>(user): Same questions as the ones in <a class="el" href="classutil_1_1BaseGraph.html#a463d57480c9563a7a707c5d0928c9946" title="Capacity reserved for future nodes, always >= num_nodes_.">node_capacity()</a>. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00959">959</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a777ff917f03a31da77f275d536578afa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a777ff917f03a31da77f275d536578afa">◆ </a></span>Build() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType = int32, typename ArcIndexType = int32> </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::Build </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Some graph implementations need to be finalized with <a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa" title="Some graph implementations need to be finalized with Build() before they can be used.">Build()</a> before they can be used. </p>
|
|
<p>After <a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa" title="Some graph implementations need to be finalized with Build() before they can be used.">Build()</a> is called, the arc indices (which had been the return values of previous <a class="el" href="classutil_1_1ListGraph.html#ac1aa8c7591bb033a49bab79c21c9f496" title="Adds an arc to the graph and returns its current index which will always be num_arcs() - 1.">AddArc()</a> calls) may change: the new index of former arc #i will be stored in permutation[i] if #i is smaller than permutation.size() or will be unchanged otherwise. If you don't care about these, just call the simple no-output version <a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa" title="Some graph implementations need to be finalized with Build() before they can be used.">Build()</a>.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>some implementations become immutable after calling <a class="el" href="classutil_1_1ListGraph.html#a777ff917f03a31da77f275d536578afa" title="Some graph implementations need to be finalized with Build() before they can be used.">Build()</a>. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00339">339</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a55c0cd4ab76f4501d0a2b9bbdb308d00"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a55c0cd4ab76f4501d0a2b9bbdb308d00">◆ </a></span>Build() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::Build </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::vector< ArcIndexType > * </td>
|
|
<td class="paramname"><em>permutation</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01167">1167</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a63fd586eed6c345866317e2f0faf377e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a63fd586eed6c345866317e2f0faf377e">◆ </a></span>BuildStartAndForwardHead()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::BuildStartAndForwardHead </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classutil_1_1SVector.html">SVector</a>< NodeIndexType > * </td>
|
|
<td class="paramname"><em>head</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::vector< ArcIndexType > * </td>
|
|
<td class="paramname"><em>start</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::vector< ArcIndexType > * </td>
|
|
<td class="paramname"><em>permutation</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Given the tail of arc #i in (*head)[i] and the head of arc #i in (*head)[~i]. </p>
|
|
<ul>
|
|
<li>Reorder the arc by increasing tail.</li>
|
|
<li>Put the head of the new arc #i in (*head)[i].</li>
|
|
<li>Put in start[i] the index of the first arc with tail >= i.</li>
|
|
<li>Update "permutation" to reflect the change, unless it is NULL. </li>
|
|
</ul>
|
|
<p>Computes the outgoing degree of each nodes and check if we need to permute something or not. Note that the tails are currently stored in the positive range of the <a class="el" href="classutil_1_1SVector.html" title="Forward declaration.">SVector</a> head.</p>
|
|
<p>Abort early if we do not need the permutation: we only need to put the heads in the positive range.</p>
|
|
<p>Computes the forward arc permutation. </p><dl class="section note"><dt>Note</dt><dd>this temporarily alters the start vector.</dd></dl>
|
|
<p>Restore in (*start)[i] the index of the first arc with tail >= i.</p>
|
|
<p>Permutes the head into their final position in head. We do not need the tails anymore at this point. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00995">995</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac47030fcb75a3220f8cf9ed79697056e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac47030fcb75a3220f8cf9ed79697056e">◆ </a></span>ComputeCumulativeSum()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::ComputeCumulativeSum </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::vector< ArcIndexType > * </td>
|
|
<td class="paramname"><em>v</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Functions commented when defined because they are implementation details. </p>
|
|
<p>Computes the cummulative sum of the entry in v.</p>
|
|
<p>We only use it with in/out degree distribution, hence the Check() at the end. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00978">978</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa3bd051d1e141b09dda17aa9b5f24f69"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa3bd051d1e141b09dda17aa9b5f24f69">◆ </a></span>FreezeCapacities()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::FreezeCapacities </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p><a class="el" href="classutil_1_1BaseGraph.html#aa3bd051d1e141b09dda17aa9b5f24f69" title="FreezeCapacities() makes any future attempt to change the graph capacities crash in DEBUG mode.">FreezeCapacities()</a> makes any future attempt to change the graph capacities crash in DEBUG mode. </p>
|
|
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000015">Todo:</a></b></dt><dd>(user): Only define this in debug mode at the cost of having a lot of ifndef NDEBUG all over the place? remove the function completely ? </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00966">966</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a07214b96597069d781e27b1dd17ef83e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a07214b96597069d781e27b1dd17ef83e">◆ </a></span>GroupForwardArcsByFunctor()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::GroupForwardArcsByFunctor </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const A & </td>
|
|
<td class="paramname"><em>a</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">B * </td>
|
|
<td class="paramname"><em>b</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000017">Todo:</a></b></dt><dd>(user): remove the public functions below.</dd></dl>
|
|
<p>They are just here during the transition from the old ebert_graph api to this new graph api. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00264">264</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad7d3d076d3c154d89f1eda855a34b487"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad7d3d076d3c154d89f1eda855a34b487">◆ </a></span>Head()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NodeIndexType <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::Head </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>arc</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01114">1114</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2097ccda3b1ad27e2c82166979018bda"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2097ccda3b1ad27e2c82166979018bda">◆ </a></span>IsArcValid()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::IsArcValid </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>arc</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns true if the given arc is a valid arc of the graph. </p>
|
|
<dl class="section note"><dt>Note</dt><dd>the arc validity range changes for graph with reverse arcs. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00219">219</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abf853acea86e01356f53055f77661770"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abf853acea86e01356f53055f77661770">◆ </a></span>IsNodeValid()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::IsNodeValid </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns true if the given node is a valid node of the graph. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00213">213</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a346b8a5811f0e287e1ebce2de2c1ad28"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a346b8a5811f0e287e1ebce2de2c1ad28">◆ </a></span>max_end_arc_index()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::max_end_arc_index </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00267">267</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a463d57480c9563a7a707c5d0928c9946"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a463d57480c9563a7a707c5d0928c9946">◆ </a></span>node_capacity()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::node_capacity </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Capacity reserved for future nodes, always >= num_nodes_. </p>
|
|
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000013">Todo:</a></b></dt><dd>(user): Is it needed? remove completely? return the real capacities at the cost of having a different implementation for each graphs? </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00951">951</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aefb468e4d4a3128c91b3bad9f5b314c8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aefb468e4d4a3128c91b3bad9f5b314c8">◆ </a></span>num_arcs()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::num_arcs </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the number of valid arcs in the graph. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00204">204</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0f551c921fa0b5aaa334a6e36f61db4a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0f551c921fa0b5aaa334a6e36f61db4a">◆ </a></span>num_nodes()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::num_nodes </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the number of valid nodes in the graph. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00201">201</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1565480b94bf179067e81d762916ed52"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1565480b94bf179067e81d762916ed52">◆ </a></span>operator[]()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="iterators_8h.html#af3f6bc803bbe87af730cf9e41a35cf68">BeginEndWrapper</a>< typename <a class="el" href="classutil_1_1ListGraph.html">ListGraph</a>< NodeIndexType, ArcIndexType >::<a class="el" href="classutil_1_1ListGraph_1_1OutgoingHeadIterator.html">OutgoingHeadIterator</a> > <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::operator[] </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This loops over the heads of the OutgoingArcs(node). </p>
|
|
<p>It is just a more convenient way to achieve this. Moreover this interface is used by some graph algorithms. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01099">1099</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac52db792129da62b7ab25372ab90647c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac52db792129da62b7ab25372ab90647c">◆ </a></span>OutDegree()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::OutDegree </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Graph jargon: the "degree" of a node is its number of arcs. </p>
|
|
<p>The out-degree is the number of outgoing arcs. The in-degree is the number of incoming arcs, and is only available for some graph implementations, below.</p>
|
|
<p><a class="el" href="classutil_1_1ListGraph.html#ac52db792129da62b7ab25372ab90647c" title="Graph jargon: the "degree" of a node is its number of arcs.">ListGraph<>::OutDegree()</a> works in O(degree). </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01121">1121</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab63770fa993b9347586d2852b841bdc2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab63770fa993b9347586d2852b841bdc2">◆ </a></span>OutgoingArcs()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType = int32, typename ArcIndexType = int32> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="iterators_8h.html#af3f6bc803bbe87af730cf9e41a35cf68">BeginEndWrapper</a><<a class="el" href="classutil_1_1ListGraph_1_1OutgoingArcIterator.html">OutgoingArcIterator</a>> <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::OutgoingArcs </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allows to iterate over the forward arcs that verify Tail(arc) == node. </p>
|
|
<p>This is meant to be used as: for (const ArcIndex arc : graph.OutgoingArcs(node)) { ... } </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac52a095c1ebbd1ca89902168350bbb75"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac52a095c1ebbd1ca89902168350bbb75">◆ </a></span>OutgoingArcsStartingFrom()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType = int32, typename ArcIndexType = int32> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="iterators_8h.html#af3f6bc803bbe87af730cf9e41a35cf68">BeginEndWrapper</a><<a class="el" href="classutil_1_1ListGraph_1_1OutgoingArcIterator.html">OutgoingArcIterator</a>> <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::OutgoingArcsStartingFrom </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>from</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Advanced usage. </p>
|
|
<p>Same as <a class="el" href="classutil_1_1ListGraph.html#ab63770fa993b9347586d2852b841bdc2" title="Allows to iterate over the forward arcs that verify Tail(arc) == node.">OutgoingArcs()</a>, but allows to restart the iteration from an already known outgoing arc of the given node. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab731ca5c638e7b1b0a2c459c94a90f55"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab731ca5c638e7b1b0a2c459c94a90f55">◆ </a></span>Reserve()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::Reserve </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>node_capacity</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>arc_capacity</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00247">247</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af637e16c3c7604f0354a6fa317358a15"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af637e16c3c7604f0354a6fa317358a15">◆ </a></span>ReserveArcs()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::ReserveArcs </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>bound</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Reimplemented from <a class="el" href="classutil_1_1BaseGraph.html#a9563f7154a759843923dd9bb27b288e7">util::BaseGraph< NodeIndexType, ArcIndexType, false ></a>.</p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01158">1158</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aefd885a0eba3ec33568137533190ba5b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aefd885a0eba3ec33568137533190ba5b">◆ </a></span>ReserveNodes()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::ReserveNodes </td>
|
|
<td>(</td>
|
|
<td class="paramtype">NodeIndexType </td>
|
|
<td class="paramname"><em>bound</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Changes the graph capacities. </p>
|
|
<p>The functions will fail in debug mode if:</p><ul>
|
|
<li>const_capacities_ is true.</li>
|
|
<li>A valid node does not fall into the new node range.</li>
|
|
<li>A valid arc does not fall into the new arc range. In non-debug mode, const_capacities_ is ignored and nothing will happen if the new capacity value for the arcs or the nodes is too small. </li>
|
|
</ul>
|
|
|
|
<p>Reimplemented from <a class="el" href="classutil_1_1BaseGraph.html#a69a71cbb575b13bde9899f5a6a217139">util::BaseGraph< NodeIndexType, ArcIndexType, false ></a>.</p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01151">1151</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aba03f198f690155bca2ab23b039cea54"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aba03f198f690155bca2ab23b039cea54">◆ </a></span>Tail()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename NodeIndexType , typename ArcIndexType > </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NodeIndexType <a class="el" href="classutil_1_1ListGraph.html">util::ListGraph</a>< NodeIndexType, ArcIndexType >::Tail </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ArcIndexType </td>
|
|
<td class="paramname"><em>arc</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the tail/head of a valid arc. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l01107">1107</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="a895e891d1ad52ce3efcfeb7ba11194c7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a895e891d1ad52ce3efcfeb7ba11194c7">◆ </a></span>arc_capacity_</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::arc_capacity_</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00279">279</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa980e5526b9ded17a83928fc339c71e4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa980e5526b9ded17a83928fc339c71e4">◆ </a></span>const_capacities_</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::const_capacities_</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00280">280</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad5b77846f77c2771e840820812ad5521"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad5b77846f77c2771e840820812ad5521">◆ </a></span>kNilArc</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::kNilArc</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00259">259</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab1292c82a3f43be3bd57b63a05fe0214"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab1292c82a3f43be3bd57b63a05fe0214">◆ </a></span>kNilNode</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::kNilNode</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Constants that will never be a valid node or arc. </p>
|
|
<p>They are the maximum possible node and arc capacity. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00258">258</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a424bd34a9767e7edeaf3a60ecd3cb000"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a424bd34a9767e7edeaf3a60ecd3cb000">◆ </a></span>node_capacity_</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::node_capacity_</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00277">277</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af16f99d41856a7b22ae8a226ef09abff"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af16f99d41856a7b22ae8a226ef09abff">◆ </a></span>num_arcs_</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ArcIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::num_arcs_</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00278">278</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a473db46afec1eabf0762411830dee30f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a473db46afec1eabf0762411830dee30f">◆ </a></span>num_nodes_</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NodeIndexType <a class="el" href="classutil_1_1BaseGraph.html">util::BaseGraph</a>< NodeIndexType, ArcIndexType, HasReverseArcs >::num_nodes_</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="graph_8h_source.html#l00276">276</a> of file <a class="el" href="graph_8h_source.html">graph.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="graph_8h_source.html">graph.h</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|