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 >
2019-07-15 17:42:24 -07:00
< li > < a href = "files.html" > < span > Files< / span > < / a > < / li >
2019-06-13 15:36:14 +02:00
< / ul >
< / div >
2019-07-12 13:25:23 -07:00
< / div > <!-- top -->
< 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">
2019-06-13 15:36:14 +02:00
< / div >
< / div >
2019-07-12 13:25:23 -07:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classoperations__research_1_1ChristofidesPathSolver.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-types" > Public Types< / a > |
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "classoperations__research_1_1ChristofidesPathSolver-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > operations_research::ChristofidesPathSolver< CostType, ArcIndex, NodeIndex, CostFunction > Class Template 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" > < h3 > template< typename CostType, typename ArcIndex = int64, typename NodeIndex = int32, typename CostFunction = std::function< CostType(NodeIndex, NodeIndex)> > < br / >
class operations_research::ChristofidesPathSolver< CostType, ArcIndex, NodeIndex, CostFunction > < / h3 >
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 = "christofides_8h_source.html#l00040" > 40< / a > of file < a class = "el" href = "christofides_8h_source.html" > christofides.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-types" > < / a >
Public Types< / h2 > < / td > < / tr >
2019-07-12 13:25:23 -07:00
< tr class = "memitem:ad44822002f75a6f478a62e107d880018" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ad44822002f75a6f478a62e107d880018" > MatchingAlgorithm< / a > { < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ad44822002f75a6f478a62e107d880018ab66d0823917c9351a4cb68dff77f445a" > MatchingAlgorithm::MINIMUM_WEIGHT_MATCHING< / a > ,
< a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ad44822002f75a6f478a62e107d880018a99c5fe202c37dcd8ed9cc60926a4f525" > MatchingAlgorithm::MINIMAL_WEIGHT_MATCHING< / a >
2019-06-13 15:36:14 +02:00
}< / td > < / tr >
< tr class = "separator:ad44822002f75a6f478a62e107d880018" > < 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:a4c46f50f1d26cb5d1945fee66db56029" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#a4c46f50f1d26cb5d1945fee66db56029" > ChristofidesPathSolver< / a > (< a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > num_nodes, CostFunction costs)< / td > < / tr >
< tr class = "separator:a4c46f50f1d26cb5d1945fee66db56029" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a76c636e1d48da64087686dd06bc45519" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#a76c636e1d48da64087686dd06bc45519" > SetMatchingAlgorithm< / a > (< a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ad44822002f75a6f478a62e107d880018" > MatchingAlgorithm< / a > matching)< / td > < / tr >
< tr class = "memdesc:a76c636e1d48da64087686dd06bc45519" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sets the matching algorith to use. < a href = "#a76c636e1d48da64087686dd06bc45519" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a76c636e1d48da64087686dd06bc45519" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ada30f267a0dea4a4f25fcce1a6158438" > < td class = "memItemLeft" align = "right" valign = "top" > CostType  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ada30f267a0dea4a4f25fcce1a6158438" > TravelingSalesmanCost< / a > ()< / td > < / tr >
< tr class = "memdesc:ada30f267a0dea4a4f25fcce1a6158438" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the cost of the approximate TSP tour. < a href = "#ada30f267a0dea4a4f25fcce1a6158438" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ada30f267a0dea4a4f25fcce1a6158438" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8db7cbf56d8882ecefcb1f88ff20c755" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#a8db7cbf56d8882ecefcb1f88ff20c755" > TravelingSalesmanPath< / a > ()< / td > < / tr >
< tr class = "memdesc:a8db7cbf56d8882ecefcb1f88ff20c755" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the approximate TSP tour. < a href = "#a8db7cbf56d8882ecefcb1f88ff20c755" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a8db7cbf56d8882ecefcb1f88ff20c755" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
2019-07-12 13:25:23 -07:00
< h2 class = "groupheader" > Member Enumeration Documentation< / h2 >
2019-06-13 15:36:14 +02:00
< a id = "ad44822002f75a6f478a62e107d880018" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ad44822002f75a6f478a62e107d880018" > ◆ < / a > < / span > MatchingAlgorithm< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename CostType , typename ArcIndex = int64, typename NodeIndex = int32, typename CostFunction = std::function< CostType(NodeIndex, NodeIndex)> > < / div >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > enum < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ad44822002f75a6f478a62e107d880018" > operations_research::ChristofidesPathSolver::MatchingAlgorithm< / a > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > strong< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< table class = "fieldtable" >
2019-07-12 13:25:23 -07:00
< tr > < th colspan = "2" > Enumerator< / th > < / tr > < tr > < td class = "fieldname" > < a id = "ad44822002f75a6f478a62e107d880018ab66d0823917c9351a4cb68dff77f445a" > < / a > MINIMUM_WEIGHT_MATCHING  < / td > < td class = "fielddoc" > < / td > < / tr >
< tr > < td class = "fieldname" > < a id = "ad44822002f75a6f478a62e107d880018a99c5fe202c37dcd8ed9cc60926a4f525" > < / a > MINIMAL_WEIGHT_MATCHING  < / td > < td class = "fielddoc" > < / td > < / tr >
2019-06-13 15:36:14 +02:00
< / table >
< p class = "definition" > Definition at line < a class = "el" href = "christofides_8h_source.html#l00042" > 42< / a > of file < a class = "el" href = "christofides_8h_source.html" > christofides.h< / a > .< / p >
< / div >
< / div >
< h2 class = "groupheader" > Constructor & Destructor Documentation< / h2 >
< a id = "a4c46f50f1d26cb5d1945fee66db56029" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a4c46f50f1d26cb5d1945fee66db56029" > ◆ < / a > < / span > ChristofidesPathSolver()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename CostType , typename ArcIndex , typename NodeIndex , typename CostFunction > < / div >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html" > operations_research::ChristofidesPathSolver< / a > < CostType, < a class = "el" href = "namespaceoperations__research.html#a31d858394c5eed1fa21edc3da47047c1" > ArcIndex< / a > , < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > , CostFunction > ::< a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html" > ChristofidesPathSolver< / a > < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a >   < / td >
< td class = "paramname" > < em > num_nodes< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > CostFunction  < / td >
< td class = "paramname" > < em > costs< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "christofides_8h_source.html#l00177" > 177< / a > of file < a class = "el" href = "christofides_8h_source.html" > christofides.h< / a > .< / p >
< / div >
< / div >
< h2 class = "groupheader" > Member Function Documentation< / h2 >
< a id = "a76c636e1d48da64087686dd06bc45519" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a76c636e1d48da64087686dd06bc45519" > ◆ < / a > < / span > SetMatchingAlgorithm()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename CostType , typename ArcIndex = int64, typename NodeIndex = int32, typename CostFunction = std::function< CostType(NodeIndex, NodeIndex)> > < / div >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html" > operations_research::ChristofidesPathSolver< / a > < CostType, < a class = "el" href = "namespaceoperations__research.html#a31d858394c5eed1fa21edc3da47047c1" > ArcIndex< / a > , < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > , CostFunction > ::SetMatchingAlgorithm < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html#ad44822002f75a6f478a62e107d880018" > MatchingAlgorithm< / a >   < / td >
< td class = "paramname" > < em > matching< / em > < / 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 > Sets the matching algorith to use. < / p >
2019-07-12 13:25:23 -07:00
< p > A minimum weight perfect matching (MINIMUM_WEIGHT_MATCHING) guarantees the 3/2 upper bound to the optimal solution. A minimal weight perfect matching (MINIMAL_WEIGHT_MATCHING) finds a locally minimal weight matching which does not offer any bound guarantee but, as of 1/2017, is orders of magnitude faster than the minimum matching. By default, MINIMAL_WEIGHT_MATCHING is selected. < / p > < dl class = "todo" > < dt > < b > < a class = "el" href = "todo.html#_todo000004" > Todo:< / a > < / b > < / dt > < dd > (user): Change the default when minimum matching gets faster. < / dd > < / dl >
2019-06-13 15:36:14 +02:00
< p class = "definition" > Definition at line < a class = "el" href = "christofides_8h_source.html#l00058" > 58< / a > of file < a class = "el" href = "christofides_8h_source.html" > christofides.h< / a > .< / p >
< / div >
< / div >
< a id = "ada30f267a0dea4a4f25fcce1a6158438" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ada30f267a0dea4a4f25fcce1a6158438" > ◆ < / a > < / span > TravelingSalesmanCost()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename CostType , typename ArcIndex , typename NodeIndex , typename CostFunction > < / div >
< table class = "memname" >
< tr >
< td class = "memname" > CostType < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html" > operations_research::ChristofidesPathSolver< / a > < CostType, < a class = "el" href = "namespaceoperations__research.html#a31d858394c5eed1fa21edc3da47047c1" > ArcIndex< / a > , < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > , CostFunction > ::TravelingSalesmanCost < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the cost of the approximate TSP tour. < / p >
< p class = "definition" > Definition at line < a class = "el" href = "christofides_8h_source.html#l00187" > 187< / a > of file < a class = "el" href = "christofides_8h_source.html" > christofides.h< / a > .< / p >
< / div >
< / div >
< a id = "a8db7cbf56d8882ecefcb1f88ff20c755" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a8db7cbf56d8882ecefcb1f88ff20c755" > ◆ < / a > < / span > TravelingSalesmanPath()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename CostType , typename ArcIndex , typename NodeIndex , typename CostFunction > < / div >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > > < a class = "el" href = "classoperations__research_1_1ChristofidesPathSolver.html" > operations_research::ChristofidesPathSolver< / a > < CostType, < a class = "el" href = "namespaceoperations__research.html#a31d858394c5eed1fa21edc3da47047c1" > ArcIndex< / a > , < a class = "el" href = "namespaceoperations__research.html#a0e629e35bfa311b31dd7f5065eb834bb" > NodeIndex< / a > , CostFunction > ::TravelingSalesmanPath < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the approximate TSP tour. < / p >
< p class = "definition" > Definition at line < a class = "el" href = "christofides_8h_source.html#l00197" > 197< / a > of file < a class = "el" href = "christofides_8h_source.html" > christofides.h< / a > .< / p >
< / div >
< / div >
< hr / > The documentation for this class was generated from the following file:< ul >
< li > < a class = "el" href = "christofides_8h_source.html" > christofides.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 >