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  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 >
< / 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& dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classDenseConnectedComponentsFinder.html','');});
/* @license-end */
< / script >
< div id = "doc-content" >
2019-06-13 15:36:14 +02:00
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "classDenseConnectedComponentsFinder-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > DenseConnectedComponentsFinder Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
2019-07-12 13:25:23 -07:00
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > NOTE(user): The rest of the functions below should also be in namespace util, but for historical reasons it hasn't been done yet. < / p >
< p > A connected components finder that only works on dense ints. < / p >
2019-06-13 15:36:14 +02:00
2019-07-12 13:25:23 -07:00
< p class = "definition" > Definition at line < a class = "el" href = "connected__components_8h_source.html#l00081" > 81< / a > of file < a class = "el" href = "connected__components_8h_source.html" > connected_components.h< / a > .< / p >
< / div > < table class = "memberdecls" >
2019-06-13 15:36:14 +02:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a33639c91528c2a525e1591df24ff2cc9" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a33639c91528c2a525e1591df24ff2cc9" > DenseConnectedComponentsFinder< / a > ()< / td > < / tr >
< tr class = "separator:a33639c91528c2a525e1591df24ff2cc9" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0026050f607ccbad98a3ec2b7dcae3c8" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a0026050f607ccbad98a3ec2b7dcae3c8" > DenseConnectedComponentsFinder< / a > (const < a class = "el" href = "classDenseConnectedComponentsFinder.html" > DenseConnectedComponentsFinder< / a > & )=delete< / td > < / tr >
< tr class = "separator:a0026050f607ccbad98a3ec2b7dcae3c8" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a20f2a5d6bb7631a0dcdd678387a1b61a" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classDenseConnectedComponentsFinder.html" > DenseConnectedComponentsFinder< / a > &   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a20f2a5d6bb7631a0dcdd678387a1b61a" > operator=< / a > (const < a class = "el" href = "classDenseConnectedComponentsFinder.html" > DenseConnectedComponentsFinder< / a > & )=delete< / td > < / tr >
< tr class = "separator:a20f2a5d6bb7631a0dcdd678387a1b61a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aba450cf3f16d9386d043c4354a19a4aa" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#aba450cf3f16d9386d043c4354a19a4aa" > AddEdge< / a > (int node1, int node2)< / td > < / tr >
< tr class = "memdesc:aba450cf3f16d9386d043c4354a19a4aa" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The main API is the same as < a class = "el" href = "classConnectedComponentsFinder.html" title = "Usage: ConnectedComponentsFinder<MyNodeType> cc; cc.AddNode(node1); cc.AddNode(node2); cc...." > ConnectedComponentsFinder< / a > (below): see the homonymous functions there. < a href = "#aba450cf3f16d9386d043c4354a19a4aa" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aba450cf3f16d9386d043c4354a19a4aa" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a071f52956431e211e14ed7f3894c1d0b" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a071f52956431e211e14ed7f3894c1d0b" > Connected< / a > (int node1, int node2)< / td > < / tr >
< tr class = "separator:a071f52956431e211e14ed7f3894c1d0b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0a639b64de57bc14f04f0f238e0092d1" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a0a639b64de57bc14f04f0f238e0092d1" > GetSize< / a > (int node)< / td > < / tr >
< tr class = "separator:a0a639b64de57bc14f04f0f238e0092d1" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a5090a0bdc205d23778d2b8a742f5c5fd" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a5090a0bdc205d23778d2b8a742f5c5fd" > GetNumberOfComponents< / a > () const< / td > < / tr >
< tr class = "separator:a5090a0bdc205d23778d2b8a742f5c5fd" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a317fb43e59ef01ebe3d0d492b4ab33dd" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a317fb43e59ef01ebe3d0d492b4ab33dd" > GetNumberOfNodes< / a > () const< / td > < / tr >
< tr class = "separator:a317fb43e59ef01ebe3d0d492b4ab33dd" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a46780e194c525fa9853fa899d69b4340" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#a46780e194c525fa9853fa899d69b4340" > SetNumberOfNodes< / a > (int num_nodes)< / td > < / tr >
< tr class = "memdesc:a46780e194c525fa9853fa899d69b4340" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sets the number of nodes in the graph. < a href = "#a46780e194c525fa9853fa899d69b4340" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a46780e194c525fa9853fa899d69b4340" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:afdcff89dd2374ce33c05934d328e64ec" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#afdcff89dd2374ce33c05934d328e64ec" > FindRoot< / a > (int node)< / td > < / tr >
< tr class = "memdesc:afdcff89dd2374ce33c05934d328e64ec" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the root of the set for the given node. < a href = "#afdcff89dd2374ce33c05934d328e64ec" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:afdcff89dd2374ce33c05934d328e64ec" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aee7f0057f42256a520b5ef32bae58b36" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< int >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDenseConnectedComponentsFinder.html#aee7f0057f42256a520b5ef32bae58b36" > GetComponentIds< / a > ()< / td > < / tr >
< tr class = "memdesc:aee7f0057f42256a520b5ef32bae58b36" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the same as < a class = "el" href = "namespaceutil.html#a13f0e8f7e15873600cf8e395958c71e1" title = "Finds the connected components of the graph, using BFS internally." > GetConnectedComponents()< / a > . < a href = "#aee7f0057f42256a520b5ef32bae58b36" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aee7f0057f42256a520b5ef32bae58b36" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
2019-07-12 13:25:23 -07:00
< h2 class = "groupheader" > Constructor & Destructor Documentation< / h2 >
2019-06-13 15:36:14 +02:00
< a id = "a33639c91528c2a525e1591df24ff2cc9" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a33639c91528c2a525e1591df24ff2cc9" > ◆ < / a > < / span > DenseConnectedComponentsFinder() < span class = "overload" > [1/2]< / span > < / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > DenseConnectedComponentsFinder::DenseConnectedComponentsFinder < / 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 = "connected__components_8h_source.html#l00083" > 83< / a > of file < a class = "el" href = "connected__components_8h_source.html" > connected_components.h< / a > .< / p >
< / div >
< / div >
< a id = "a0026050f607ccbad98a3ec2b7dcae3c8" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a0026050f607ccbad98a3ec2b7dcae3c8" > ◆ < / a > < / span > DenseConnectedComponentsFinder() < span class = "overload" > [2/2]< / span > < / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > DenseConnectedComponentsFinder::DenseConnectedComponentsFinder < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "classDenseConnectedComponentsFinder.html" > DenseConnectedComponentsFinder< / a > &   < / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > delete< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< h2 class = "groupheader" > Member Function Documentation< / h2 >
< a id = "aba450cf3f16d9386d043c4354a19a4aa" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aba450cf3f16d9386d043c4354a19a4aa" > ◆ < / a > < / span > AddEdge()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void DenseConnectedComponentsFinder::AddEdge < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > node1< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > node2< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > The main API is the same as < a class = "el" href = "classConnectedComponentsFinder.html" title = "Usage: ConnectedComponentsFinder<MyNodeType> cc; cc.AddNode(node1); cc.AddNode(node2); cc...." > ConnectedComponentsFinder< / a > (below): see the homonymous functions there. < / p >
< / div >
< / div >
< a id = "a071f52956431e211e14ed7f3894c1d0b" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a071f52956431e211e14ed7f3894c1d0b" > ◆ < / a > < / span > Connected()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool DenseConnectedComponentsFinder::Connected < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > node1< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > node2< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a id = "afdcff89dd2374ce33c05934d328e64ec" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#afdcff89dd2374ce33c05934d328e64ec" > ◆ < / a > < / span > FindRoot()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int DenseConnectedComponentsFinder::FindRoot < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > node< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the root of the set for the given node. < / p >
< p > node must be in [0;< a class = "el" href = "classDenseConnectedComponentsFinder.html#a317fb43e59ef01ebe3d0d492b4ab33dd" > GetNumberOfNodes()< / a > -1]. Non-const because it does path compression internally. < / p >
< / div >
< / div >
< a id = "aee7f0057f42256a520b5ef32bae58b36" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aee7f0057f42256a520b5ef32bae58b36" > ◆ < / a > < / span > GetComponentIds()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< int> DenseConnectedComponentsFinder::GetComponentIds < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the same as < a class = "el" href = "namespaceutil.html#a13f0e8f7e15873600cf8e395958c71e1" title = "Finds the connected components of the graph, using BFS internally." > GetConnectedComponents()< / a > . < / p >
< / div >
< / div >
< a id = "a5090a0bdc205d23778d2b8a742f5c5fd" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a5090a0bdc205d23778d2b8a742f5c5fd" > ◆ < / a > < / span > GetNumberOfComponents()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > int DenseConnectedComponentsFinder::GetNumberOfComponents < / 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 > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "connected__components_8h_source.html#l00095" > 95< / a > of file < a class = "el" href = "connected__components_8h_source.html" > connected_components.h< / a > .< / p >
< / div >
< / div >
< a id = "a317fb43e59ef01ebe3d0d492b4ab33dd" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a317fb43e59ef01ebe3d0d492b4ab33dd" > ◆ < / a > < / span > GetNumberOfNodes()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > int DenseConnectedComponentsFinder::GetNumberOfNodes < / 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 > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "connected__components_8h_source.html#l00096" > 96< / a > of file < a class = "el" href = "connected__components_8h_source.html" > connected_components.h< / a > .< / p >
< / div >
< / div >
< a id = "a0a639b64de57bc14f04f0f238e0092d1" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a0a639b64de57bc14f04f0f238e0092d1" > ◆ < / a > < / span > GetSize()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int DenseConnectedComponentsFinder::GetSize < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > node< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a id = "a20f2a5d6bb7631a0dcdd678387a1b61a" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a20f2a5d6bb7631a0dcdd678387a1b61a" > ◆ < / a > < / span > operator=()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "classDenseConnectedComponentsFinder.html" > DenseConnectedComponentsFinder< / a > & DenseConnectedComponentsFinder::operator= < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "classDenseConnectedComponentsFinder.html" > DenseConnectedComponentsFinder< / a > &   < / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > delete< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a id = "a46780e194c525fa9853fa899d69b4340" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a46780e194c525fa9853fa899d69b4340" > ◆ < / a > < / span > SetNumberOfNodes()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void DenseConnectedComponentsFinder::SetNumberOfNodes < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > num_nodes< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Sets the number of nodes in the graph. < / p >
< p > The graph can only grow: this dies if "num_nodes" is lower or equal to any of the values ever given to < a class = "el" href = "classDenseConnectedComponentsFinder.html#aba450cf3f16d9386d043c4354a19a4aa" title = "The main API is the same as ConnectedComponentsFinder (below): see the homonymous functions there." > AddEdge()< / a > , or lower than a previous value given to < a class = "el" href = "classDenseConnectedComponentsFinder.html#a46780e194c525fa9853fa899d69b4340" title = "Sets the number of nodes in the graph." > SetNumberOfNodes()< / a > . You need this if there are nodes that don't have any edges. < / p >
< / div >
< / div >
< hr / > The documentation for this class was generated from the following file:< ul >
< li > < a class = "el" href = "connected__components_8h_source.html" > connected_components.h< / a > < / li >
< / ul >
< / 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 >