Files
ortools-clone/docs/cpp_graph/cliques_8h_source.html

79 lines
100 KiB
HTML
Raw Normal View History

2019-06-13 15:36:14 +02:00
<!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"/>-->
2019-06-20 23:08:48 +02:00
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
2019-06-13 15:36:14 +02:00
<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">
2019-06-29 18:18:08 +02:00
<span id="sfml">OR-Tools 7.2</span>
2019-06-13 15:36:14 +02:00
</div>
</div>
2019-06-29 18:18:08 +02:00
<link rel="icon" href="https://developers.google.com/optimization/images/orLogo.png">
2019-06-13 15:36:14 +02:00
<div id="content">
<!-- Generated by Doxygen 1.8.15 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
2019-07-15 17:42:24 -07:00
<li class="current"><a href="files.html"><span>Files</span></a></li>
2019-06-13 15:36:14 +02:00
</ul>
</div>
</div><!-- top -->
2019-07-12 13:25:23 -07:00
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('cliques_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
2019-06-13 15:36:14 +02:00
<div class="header">
<div class="headertitle">
<div class="title">cliques.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="cliques_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2010-2018 Google LLC</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// limitations under the License.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// Maximal clique algorithms, based on the Bron-Kerbosch algorithm.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// See http://en.wikipedia.org/wiki/Bron-Kerbosch_algorithm</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">// and</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// C. Bron and J. Kerbosch, Joep, &quot;Algorithm 457: finding all cliques of an</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// undirected graph&quot;, CACM 16 (9): 575-577, 1973.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">// http://dl.acm.org/citation.cfm?id=362367&amp;bnc=1.</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">// Keywords: undirected graph, clique, clique cover, Bron, Kerbosch.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#ifndef OR_TOOLS_GRAPH_CLIQUES_H_</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#define OR_TOOLS_GRAPH_CLIQUES_H_</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class=
<div class="ttc" id="namespaceoperations__research_html_a708cf34b342e7d2ed89a3b73dbec4eae"><div class="ttname"><a href="namespaceoperations__research.html#a708cf34b342e7d2ed89a3b73dbec4eae">operations_research::BronKerboschAlgorithmStatus</a></div><div class="ttdeci">BronKerboschAlgorithmStatus</div><div class="ttdoc">The status value returned by BronKerboschAlgorithm::Run and BronKerboschAlgorithm::RunIterations.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00068">cliques.h:68</a></div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_aa28a934535a824fa63672b6c314b61cc"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#aa28a934535a824fa63672b6c314b61cc">operations_research::BronKerboschAlgorithm::RunWithTimeLimit</a></div><div class="ttdeci">BronKerboschAlgorithmStatus RunWithTimeLimit(int64 max_num_iterations, TimeLimit *time_limit)</div><div class="ttdoc">Runs at most 'max_num_iterations' iterations of the Bron-Kerbosch algorithm, until the time limit is ...</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00508">cliques.h:508</a></div></div>
<div class="ttc" id="namespaceoperations__research_html_af2d89e69d073dc3036a6de24710b416f"><div class="ttname"><a href="namespaceoperations__research.html#af2d89e69d073dc3036a6de24710b416f">operations_research::CliqueResponse</a></div><div class="ttdeci">CliqueResponse</div><div class="ttdoc">Possible return values of the callback for reporting cliques.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00058">cliques.h:58</a></div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_a2c635d9b0b40012abf93606dd023e535"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#a2c635d9b0b40012abf93606dd023e535">operations_research::BronKerboschAlgorithm::IsArcCallback</a></div><div class="ttdeci">std::function&lt; bool(NodeIndex, NodeIndex)&gt; IsArcCallback</div><div class="ttdoc">A callback called by the algorithm to test if there is an arc between a pair of nodes.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00149">cliques.h:149</a></div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_a4a1ea40849bc5e92cecec1a90f2f2bb9"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#a4a1ea40849bc5e92cecec1a90f2f2bb9">operations_research::BronKerboschAlgorithm::RunWithTimeLimit</a></div><div class="ttdeci">BronKerboschAlgorithmStatus RunWithTimeLimit(TimeLimit *time_limit)</div><div class="ttdoc">Runs the Bron-Kerbosch algorithm for at most kint64max iterations, until the time limit is excceded o...</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00203">cliques.h:203</a></div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html">operations_research::BronKerboschAlgorithm</a></div><div class="ttdoc">Implements the Bron-Kerbosch algorithm for finding maximal cliques.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00143">cliques.h:143</a></div></div>
<div class="ttc" id="namespaceoperations__research_html_afe4b5a6c0e4019314f288e3f4307c114"><div class="ttname"><a href="namespaceoperations__research.html#afe4b5a6c0e4019314f288e3f4307c114">operations_research::CoverArcsByCliques</a></div><div class="ttdeci">void CoverArcsByCliques(std::function&lt; bool(int, int)&gt; graph, int node_count, std::function&lt; bool(const std::vector&lt; int &gt; &amp;)&gt; callback)</div><div class="ttdoc">Covers the maximum number of arcs of the graph with cliques.</div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_a6dcb077f31531cc17c94da3364b6f099"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#a6dcb077f31531cc17c94da3364b6f099">operations_research::BronKerboschAlgorithm::Run</a></div><div class="ttdeci">BronKerboschAlgorithmStatus Run()</div><div class="ttdoc">Runs the Bron-Kerbosch algorithm for kint64max iterations.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00553">cliques.h:553</a></div></div>
<div class="ttc" id="namespaceoperations__research_html_af2d89e69d073dc3036a6de24710b416fa615a46af313786fc4e349f34118be111"><div class="ttname"><a href="namespaceoperations__research.html#af2d89e69d073dc3036a6de24710b416fa615a46af313786fc4e349f34118be111">operations_research::CliqueResponse::STOP</a></div><div class="ttdoc">The algorithm will stop the search immediately.</div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_ae7ca5a1b7767ea98c2f337e8b6f94c44"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#ae7ca5a1b7767ea98c2f337e8b6f94c44">operations_research::BronKerboschAlgorithm::BronKerboschAlgorithm</a></div><div class="ttdeci">BronKerboschAlgorithm(IsArcCallback is_arc, NodeIndex num_nodes, CliqueCallback clique_callback)</div><div class="ttdoc">Initializes the Bron-Kerbosch algorithm for the given graph and clique callback function.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00163">cliques.h:163</a></div></div>
<div class="ttc" id="namespaceoperations__research_html_af2d89e69d073dc3036a6de24710b416fa2f453cfe638e57e27bb0c9512436111e"><div class="ttname"><a href="namespaceoperations__research.html#af2d89e69d073dc3036a6de24710b416fa2f453cfe638e57e27bb0c9512436111e">operations_research::CliqueResponse::CONTINUE</a></div><div class="ttdoc">The algorithm will continue searching for other maximal cliques.</div></div>
<div class="ttc" id="namespaceoperations__research_html_a708cf34b342e7d2ed89a3b73dbec4eaea8f7afecbc8fbc4cd0f50a57d1172482e"><div class="ttname"><a href="namespaceoperations__research.html#a708cf34b342e7d2ed89a3b73dbec4eaea8f7afecbc8fbc4cd0f50a57d1172482e">operations_research::BronKerboschAlgorithmStatus::COMPLETED</a></div><div class="ttdoc">The algorithm has enumerated all maximal cliques.</div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_a14b12a4c5ea291009f47c1a98c458f81"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#a14b12a4c5ea291009f47c1a98c458f81">operations_research::BronKerboschAlgorithm::RunIterations</a></div><div class="ttdeci">BronKerboschAlgorithmStatus RunIterations(int64 max_num_iterations)</div><div class="ttdoc">Runs at most 'max_num_iterations' iterations of the Bron-Kerbosch algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00546">cliques.h:546</a></div></div>
2019-06-13 15:51:12 +02:00
<div class="ttc" id="namespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in c...</div><div class="ttdef"><b>Definition:</b> <a href="christofides_8h_source.html#l00033">christofides.h:33</a></div></div>
2019-06-13 15:36:14 +02:00
<div class="ttc" id="namespaceoperations__research_html_a708cf34b342e7d2ed89a3b73dbec4eaea658f2cadfdf09b6046246e9314f7cd43"><div class="ttname"><a href="namespaceoperations__research.html#a708cf34b342e7d2ed89a3b73dbec4eaea658f2cadfdf09b6046246e9314f7cd43">operations_research::BronKerboschAlgorithmStatus::INTERRUPTED</a></div><div class="ttdoc">The search algorithm was interrupted either because it reached the iteration limit or because the cli...</div></div>
<div class="ttc" id="namespaceoperations__research_html_a0e629e35bfa311b31dd7f5065eb834bb"><div class="ttname"><a href="namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb">operations_research::NodeIndex</a></div><div class="ttdeci">int32 NodeIndex</div><div class="ttdoc">Standard instantiation of ForwardEbertGraph (named 'ForwardStarGraph') of EbertGraph (named 'StarGrap...</div><div class="ttdef"><b>Definition:</b> <a href="ebert__graph_8h_source.html#l00192">ebert_graph.h:192</a></div></div>
<div class="ttc" id="classoperations__research_1_1BronKerboschAlgorithm_html_ae49289c12a088e9f15bb26f927406c2f"><div class="ttname"><a href="classoperations__research_1_1BronKerboschAlgorithm.html#ae49289c12a088e9f15bb26f927406c2f">operations_research::BronKerboschAlgorithm::CliqueCallback</a></div><div class="ttdeci">std::function&lt; CliqueResponse(const std::vector&lt; NodeIndex &gt; &amp;)&gt; CliqueCallback</div><div class="ttdoc">A callback called by the algorithm to report a maximal clique to the user.</div><div class="ttdef"><b>Definition:</b> <a href="cliques_8h_source.html#l00159">cliques.h:159</a></div></div>
</div><!-- fragment --></div><!-- contents -->
2019-07-12 13:25:23 -07:00
</div><!-- doc-content -->
2019-06-13 15:36:14 +02:00
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>