2019-08-07 18:01:08 -07: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"/> -->
< 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" >
2020-01-27 13:48:26 +01:00
< span id = "sfml" > Google OR-Tools 7.5< / span >
2019-08-07 18:01:08 -07:00
< / div >
< / div >
< div id = "content" style = "width: 100%; overflow: hidden;" >
< div style = "margin-left: 15px; margin-top: 5px; float: left; color: #145A32;" >
2019-08-12 09:16:03 -07:00
< h2 > C++ Reference< / h2 >
2019-08-07 18:01:08 -07:00
< ul >
< li > < a href = "../cpp_algorithms/annotated.html" > Algorithms< / a > < / li >
2019-08-12 09:16:03 -07:00
< li > < a href = "../cpp_sat/annotated.html" > CP-SAT< / a > < / li >
2019-08-07 18:01:08 -07:00
< li > < a href = "../cpp_graph/annotated.html" > Graph< / a > < / li >
< li > < a href = "../cpp_routing/annotated.html" > Routing< / a > < / li >
< li > < a href = "../cpp_linear/annotated.html" > Linear solver< / a > < / li >
< / ul >
< / div >
< div id = "content" >
< div align = "center" >
< h1 style = "color: #145A32;" > C++ Reference: Algorithms< / h1 >
< / div >
2020-01-27 13:48:26 +01:00
<!-- Generated by Doxygen 1.8.18 -->
2019-08-07 18:01:08 -07:00
< div id = "navrow1" class = "tabs" >
< ul class = "tablist" >
< 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 = "nav-path" class = "navpath" >
< ul >
< li class = "navelem" > < a class = "el" href = "namespaceoperations__research.html" > operations_research< / a > < / li > < li class = "navelem" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html" > BaseKnapsackSolver< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "classoperations__research_1_1BaseKnapsackSolver-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > BaseKnapsackSolver< span class = "mlabels" > < span class = "mlabel" > abstract< / span > < / span > < / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
2019-08-12 23:15:11 -07:00
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" >
2019-08-22 13:38:15 +02:00
< p class = "definition" > Definition at line < a class = "el" href = "knapsack__solver_8h_source.html#l00557" > 557< / a > of file < a class = "el" href = "knapsack__solver_8h_source.html" > knapsack_solver.h< / a > .< / p >
2019-08-12 23:15:11 -07:00
< / div > < table class = "memberdecls" >
2019-08-07 18:01:08 -07:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:ac6518fa5a6dd37173c7700bc2d9b6071" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#ac6518fa5a6dd37173c7700bc2d9b6071" > BaseKnapsackSolver< / a > (const std::string & solver_name)< / td > < / tr >
< tr class = "separator:ac6518fa5a6dd37173c7700bc2d9b6071" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab5b44517ac32ba76590129831a826096" > < td class = "memItemLeft" align = "right" valign = "top" > virtual  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#ab5b44517ac32ba76590129831a826096" > ~BaseKnapsackSolver< / a > ()< / td > < / tr >
< tr class = "separator:ab5b44517ac32ba76590129831a826096" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ac978ac74a7ba1451dd87398ac903234c" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#ac978ac74a7ba1451dd87398ac903234c" > Init< / a > (const std::vector< int64 > & profits, const std::vector< std::vector< int64 > > & weights, const std::vector< int64 > & capacities)=0< / td > < / tr >
< tr class = "separator:ac978ac74a7ba1451dd87398ac903234c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae85c7e2f3bfc7d9a752a3ee4a4205c28" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#ae85c7e2f3bfc7d9a752a3ee4a4205c28" > GetLowerAndUpperBoundWhenItem< / a > (int item_id, bool is_item_in, int64 *lower_bound, int64 *upper_bound)< / td > < / tr >
< tr class = "separator:ae85c7e2f3bfc7d9a752a3ee4a4205c28" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a64d6539ac3d0d0cd8c1e6c4ea41dac52" > < td class = "memItemLeft" align = "right" valign = "top" > virtual int64  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#a64d6539ac3d0d0cd8c1e6c4ea41dac52" > Solve< / a > (TimeLimit *time_limit, bool *is_solution_optimal)=0< / td > < / tr >
< tr class = "separator:a64d6539ac3d0d0cd8c1e6c4ea41dac52" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af75968e8e76e35de6e7cdfaa0488b131" > < td class = "memItemLeft" align = "right" valign = "top" > virtual bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#af75968e8e76e35de6e7cdfaa0488b131" > best_solution< / a > (int item_id) const =0< / td > < / tr >
< tr class = "separator:af75968e8e76e35de6e7cdfaa0488b131" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae194e7bee4a383e5ee6c8ed341b49b7e" > < td class = "memItemLeft" align = "right" valign = "top" > virtual std::string  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html#ae194e7bee4a383e5ee6c8ed341b49b7e" > GetName< / a > () const< / td > < / tr >
< tr class = "separator:ae194e7bee4a383e5ee6c8ed341b49b7e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
2019-08-12 23:15:11 -07:00
< h2 class = "groupheader" > Constructor & Destructor Documentation< / h2 >
2019-08-07 18:01:08 -07:00
< a id = "ac6518fa5a6dd37173c7700bc2d9b6071" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ac6518fa5a6dd37173c7700bc2d9b6071" > ◆ < / a > < / span > BaseKnapsackSolver()< / 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 = "classoperations__research_1_1BaseKnapsackSolver.html" > BaseKnapsackSolver< / a > < / td >
< td > (< / td >
< td class = "paramtype" > const std::string &   < / td >
< td class = "paramname" > < em > solver_name< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > explicit< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2019-08-22 13:38:15 +02:00
< p class = "definition" > Definition at line < a class = "el" href = "knapsack__solver_8h_source.html#l00559" > 559< / a > of file < a class = "el" href = "knapsack__solver_8h_source.html" > knapsack_solver.h< / a > .< / p >
2019-08-07 18:01:08 -07:00
< / div >
< / div >
< a id = "ab5b44517ac32ba76590129831a826096" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ab5b44517ac32ba76590129831a826096" > ◆ < / a > < / span > ~BaseKnapsackSolver()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual ~< a class = "el" href = "classoperations__research_1_1BaseKnapsackSolver.html" > BaseKnapsackSolver< / 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 class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2019-08-22 13:38:15 +02:00
< p class = "definition" > Definition at line < a class = "el" href = "knapsack__solver_8h_source.html#l00561" > 561< / a > of file < a class = "el" href = "knapsack__solver_8h_source.html" > knapsack_solver.h< / a > .< / p >
2019-08-07 18:01:08 -07:00
< / div >
< / div >
< h2 class = "groupheader" > Member Function Documentation< / h2 >
< a id = "af75968e8e76e35de6e7cdfaa0488b131" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#af75968e8e76e35de6e7cdfaa0488b131" > ◆ < / a > < / span > best_solution()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual bool best_solution < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > item_id< / em > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > pure virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Implemented in < a class = "el" href = "classoperations__research_1_1KnapsackGenericSolver.html#abfd4cb3faa2f1d6840b8123765fa2fc4" > KnapsackGenericSolver< / a > .< / p >
< / div >
< / div >
< a id = "ae85c7e2f3bfc7d9a752a3ee4a4205c28" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ae85c7e2f3bfc7d9a752a3ee4a4205c28" > ◆ < / a > < / span > GetLowerAndUpperBoundWhenItem()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual void GetLowerAndUpperBoundWhenItem < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > item_id< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > is_item_in< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int64 *  < / td >
< td class = "paramname" > < em > lower_bound< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int64 *  < / td >
< td class = "paramname" > < em > upper_bound< / 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" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Reimplemented in < a class = "el" href = "classoperations__research_1_1KnapsackGenericSolver.html#a35bfa97bc24861491acb8d3d20087306" > KnapsackGenericSolver< / a > .< / p >
< / div >
< / div >
< a id = "ae194e7bee4a383e5ee6c8ed341b49b7e" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ae194e7bee4a383e5ee6c8ed341b49b7e" > ◆ < / a > < / span > GetName()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual std::string GetName < / 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" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2019-08-22 13:38:15 +02:00
< p class = "definition" > Definition at line < a class = "el" href = "knapsack__solver_8h_source.html#l00581" > 581< / a > of file < a class = "el" href = "knapsack__solver_8h_source.html" > knapsack_solver.h< / a > .< / p >
2019-08-07 18:01:08 -07:00
< / div >
< / div >
< a id = "ac978ac74a7ba1451dd87398ac903234c" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ac978ac74a7ba1451dd87398ac903234c" > ◆ < / a > < / span > Init()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual void Init < / td >
< td > (< / td >
< td class = "paramtype" > const std::vector< int64 > &   < / td >
< td class = "paramname" > < em > profits< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const std::vector< std::vector< int64 > > &   < / td >
< td class = "paramname" > < em > weights< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const std::vector< int64 > &   < / td >
< td class = "paramname" > < em > capacities< / 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" > pure virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Implemented in < a class = "el" href = "classoperations__research_1_1KnapsackGenericSolver.html#a51cac72a6280d047002a1b9bf34d7948" > KnapsackGenericSolver< / a > .< / p >
< / div >
< / div >
< a id = "a64d6539ac3d0d0cd8c1e6c4ea41dac52" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a64d6539ac3d0d0cd8c1e6c4ea41dac52" > ◆ < / a > < / span > Solve()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual int64 Solve < / td >
< td > (< / td >
< td class = "paramtype" > TimeLimit *  < / td >
< td class = "paramname" > < em > time_limit< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool *  < / td >
< td class = "paramname" > < em > is_solution_optimal< / 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" > pure virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Implemented in < a class = "el" href = "classoperations__research_1_1KnapsackGenericSolver.html#ad596c251b64c28e1e5b34e9de44b2dd7" > KnapsackGenericSolver< / a > .< / p >
< / div >
< / div >
< hr / > The documentation for this class was generated from the following file:< ul >
< li > < a class = "el" href = "knapsack__solver_8h_source.html" > knapsack_solver.h< / a > < / li >
< / ul >
< / div > <!-- contents -->
< / div >
< / div >
< div id = "footer-container" >
< div id = "footer" >
< / div >
< / div >
< / body >
< / html >