diff --git a/docs/cpp_algorithms/annotated.html b/docs/cpp_algorithms/annotated.html index acc434d504..19b035e5b1 100644 --- a/docs/cpp_algorithms/annotated.html +++ b/docs/cpp_algorithms/annotated.html @@ -33,20 +33,11 @@
-#include <knapsack_solver.h>

Public Member Functions | |
| BaseKnapsackSolver (const std::string &solver_name) | |
| virtual std::string | GetName () const |
Definition at line 556 of file knapsack_solver.h.
-#include <dense_doubly_linked_list.h>
Public Member Functions | |
| template<class T > | |
| void | Remove (int i) |
Definition at line 29 of file dense_doubly_linked_list.h.
-#include <dynamic_partition.h>
Classes | |
| struct | IterablePart |
| const std::vector< int > & | ElementsInHierarchicalOrder () const |
Definition at line 49 of file dynamic_partition.h.
-#include <dynamic_permutation.h>
Public Member Functions | |
| DynamicPermutation (int n) | |
| std::string | DebugString () const |
Definition at line 33 of file dynamic_permutation.h.
-#include <find_graph_symmetries.h>
Public Types | |
| typedef ::util::StaticGraph | Graph |
| void | DistinguishNodeInPartition (int node, DynamicPartition *partition, std::vector< int > *new_singletons_or_null) |
Definition at line 43 of file find_graph_symmetries.h.
-#include <knapsack_solver.h>


Public Member Functions | |
| KnapsackCapacityPropagator (const KnapsackState &state, int64 capacity) | |
| void | set_profit_upper_bound (int64 profit) |
Definition at line 516 of file knapsack_solver.h.
-#include <knapsack_solver.h>


Public Member Functions | |
| KnapsackGenericSolver (const std::string &solver_name) | |
| virtual std::string | GetName () const |
Definition at line 595 of file knapsack_solver.h.
-#include <knapsack_solver.h>

Public Member Functions | |
| KnapsackPropagator (const KnapsackState &state) | |
| void | set_profit_upper_bound (int64 profit) |
Definition at line 430 of file knapsack_solver.h.
-#include <knapsack_solver.h>
Public Member Functions | |
| KnapsackSearchNode (const KnapsackSearchNode *const parent, const KnapsackAssignment &assignment) | |
| void | set_next_item_id (int id) |
Definition at line 321 of file knapsack_solver.h.
-#include <knapsack_solver.h>
Public Member Functions | |
| KnapsackSearchPath (const KnapsackSearchNode &from, const KnapsackSearchNode &to) | |
| const KnapsackSearchNode * | MoveUpToDepth (const KnapsackSearchNode &node, int depth) const |
Definition at line 375 of file knapsack_solver.h.
-This library solves knapsack problems. - More...
- -#include <knapsack_solver.h>
Public Types | |
| enum | SolverType { @@ -112,24 +115,7 @@ Public Member Functions |
| Time limit in seconds. More... | |
This library solves knapsack problems.
-Problems the library solves include:
Given n items, each with a profit and a weight, given a knapsack of capacity c, the goal is to find a subset of items which fits inside c and maximizes the total profit. The knapsack problem can easily be extended from 1 to d dimensions. As an example, this can be useful to constrain the maximum number of items inside the knapsack. Without loss of generality, profits and weights are assumed to be positive.
-From a mathematical point of view, the multi-dimensional knapsack problem can be modeled by d linear constraints:
ForEach(j:1..d)(Sum(i:1..n)(weight_ij * item_i) <= c_j - where item_i is a 0-1 integer variable. -
Then the goal is to maximize:
Sum(i:1..n)(profit_i * item_i). -
There are several ways to solve knapsack problems. One of the most efficient is based on dynamic programming (mainly when weights, profits and dimensions are small, and the algorithm runs in pseudo polynomial time). Unfortunately, when adding conflict constraints the problem becomes strongly NP-hard, i.e. there is no pseudo-polynomial algorithm to solve it. That's the reason why the most of the following code is based on branch and bound search.
-For instance to solve a 2-dimensional knapsack problem with 9 items, one just has to feed a profit vector with the 9 profits, a vector of 2 vectors for weights, and a vector of capacities. E.g.:
-Python:
-C++:
-Java:
-Definition at line 120 of file knapsack_solver.h.
-#include <knapsack_solver.h>
Public Member Functions | |
| KnapsackState () | |
| bool | is_in (int id) const |
Definition at line 396 of file knapsack_solver.h.
-#include <dynamic_partition.h>
Public Member Functions | |
| MergingPartition () | |
| int | GetRoot (int node) const |
Definition at line 203 of file dynamic_partition.h.
-#include <vector>#include "ortools/base/logging.h"
Go to the source code of this file.
diff --git a/docs/cpp_algorithms/dense__doubly__linked__list_8h_source.html b/docs/cpp_algorithms/dense__doubly__linked__list_8h_source.html
index f3093e883e..030af81c41 100644
--- a/docs/cpp_algorithms/dense__doubly__linked__list_8h_source.html
+++ b/docs/cpp_algorithms/dense__doubly__linked__list_8h_source.html
@@ -33,17 +33,11 @@
-
-
diff --git a/docs/cpp_algorithms/dir_a7cc1eeded8f693d0da6c729bc88c45a.html b/docs/cpp_algorithms/dir_a7cc1eeded8f693d0da6c729bc88c45a.html
index 25cf326d97..6f547100b7 100644
--- a/docs/cpp_algorithms/dir_a7cc1eeded8f693d0da6c729bc88c45a.html
+++ b/docs/cpp_algorithms/dir_a7cc1eeded8f693d0da6c729bc88c45a.html
@@ -33,17 +33,11 @@
-
-
diff --git a/docs/cpp_algorithms/dynamic__partition_8h.html b/docs/cpp_algorithms/dynamic__partition_8h.html
index aa07f02011..752fd4a967 100644
--- a/docs/cpp_algorithms/dynamic__partition_8h.html
+++ b/docs/cpp_algorithms/dynamic__partition_8h.html
@@ -33,17 +33,11 @@
-
-
@@ -57,30 +51,7 @@
dynamic_partition.h File Reference
- #include <string>- #include <vector>- #include "ortools/base/logging.h"-
-Include dependency graph for dynamic_partition.h:
-
-
-![]()
-This graph shows which files directly or indirectly include this file:
-
-
-![]() Go to the source code of this file.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Definition at line 189 of file connected_components.h.
-#include <connected_components.h>
Public Member Functions | |
| DenseConnectedComponentsFinder () | |
| std::vector< int > | GetComponentIds () |
Definition at line 81 of file connected_components.h.
-#include <ebert_graph.h>


Public Member Functions | |
| AnnotatedGraphBuildManager (typename GraphType::NodeIndex num_nodes, typename GraphType::ArcIndex num_arcs, bool sort_arcs) | |
| GraphType * | Graph (PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler) |
Definition at line 2064 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| ArcFunctorOrderingByTailAndHead (const GraphType &graph) | |
| bool | operator() (typename GraphType::ArcIndex a, typename GraphType::ArcIndex b) const |
Definition at line 1939 of file ebert_graph.h.
-#include <linear_assignment.h>
Public Member Functions | |
| ArcIndexOrderingByTailNode (const GraphType &graph) | |
| bool | operator() (typename GraphType::ArcIndex a, typename GraphType::ArcIndex b) const |
Definition at line 1057 of file linear_assignment.h.
-#include <cliques.h>
Public Types | |
| using | IsArcCallback = std::function< bool(NodeIndex, NodeIndex)> |
| BronKerboschAlgorithmStatus | RunWithTimeLimit (TimeLimit *time_limit) |
#include <christofides.h>
Public Types | |
| enum | MatchingAlgorithm { MINIMUM_WEIGHT_MATCHING, @@ -82,13 +77,7 @@ Public Member Functions |
| std::vector< NodeIndex > | TravelingSalesmanPath () |
Definition at line 40 of file christofides.h.
-#include <connectivity.h>
Public Member Functions | |
| ConnectedComponents () | |
| void | MergeClasses (NodeIndex node1, NodeIndex node2) |
Definition at line 67 of file connectivity.h.
-#include <linear_assignment.h>


Public Member Functions | |
| CostValueCycleHandler (std::vector< CostValue > *cost) | |
| ~CostValueCycleHandler () override | |
Definition at line 1024 of file linear_assignment.h.
-#include <ebert_graph.h>


Classes | |
| class | IncomingArcIterator |
| bool | representation_clean_ |
Definition at line 188 of file ebert_graph.h.
-#include <ebert_graph.h>


Classes | |
| class | CycleHandlerForAnnotatedArcs |
| NodeIndexType | num_nodes_ |
-Friends | |
| class | StarGraphBase< NodeIndexType, ArcIndexType, DerivedGraph > |
Definition at line 948 of file ebert_graph.h.
-#include <ebert_graph.h>


Public Member Functions | |
| CycleHandlerForAnnotatedArcs (PermutationCycleHandler< ArcIndexType > *annotation_handler, DerivedGraph *graph) | |
| ~CycleHandlerForAnnotatedArcs () override | |
Definition at line 1047 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| IncomingArcIterator (const EbertGraph &graph, NodeIndexType node) | |
| ArcIndexType | Index () const |
Definition at line 1298 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| OutgoingOrOppositeIncomingArcIterator (const EbertGraph &graph, NodeIndexType node) | |
| ArcIndexType | Index () const |
Definition at line 1237 of file ebert_graph.h.
-#include <hamiltonian_path.h>
Public Member Functions | |
| ElementIterator (Set set) | |
| const ElementIterator & | operator++ () |
Definition at line 104 of file hamiltonian_path.h.
-#include <ebert_graph.h>


Public Types | |
| typedef NodeIndexType | NodeIndex |
| NodeIndexType | num_nodes_ |
Definition at line 190 of file ebert_graph.h.
-#include <ebert_graph.h>


Classes | |
| class | CycleHandlerForAnnotatedArcs |
| ZVector< ArcIndexType > | first_incident_arc_ |
-Friends | |
| class | StarGraphBase< NodeIndexType, ArcIndexType, ForwardStaticGraph< NodeIndexType, ArcIndexType > > |
Definition at line 192 of file ebert_graph.h.
-#include <ebert_graph.h>


Public Member Functions | |
| CycleHandlerForAnnotatedArcs (PermutationCycleHandler< ArcIndexType > *annotation_handler, NodeIndexType *data) | |
| void | SetIndexFromTemp (ArcIndexType destination) const override |
Definition at line 570 of file ebert_graph.h.
-#include <max_flow.h>


Public Types | |
| typedef Graph::NodeIndex | NodeIndex |
| static const FlowQuantity | kMaxFlowQuantity |
Definition at line 144 of file max_flow.h.
-#include <min_cost_flow.h>


Public Types | |
| typedef Graph::NodeIndex | NodeIndex |
| void | SetCheckFeasibility (bool value) |
Definition at line 188 of file min_cost_flow.h.
-#include <hamiltonian_path.h>
Public Types | |
| typedef uint32 | Integer |
| bool | VerifiesTriangleInequality () |
Definition at line 453 of file hamiltonian_path.h.
-#include <one_tree_lower_bound.h>
Public Member Functions | |
| HeldWolfeCrowderEvaluator (int number_of_nodes, const CostFunction &cost) | |
| void | OnNewWMax (CostType one_tree_cost) |
Definition at line 206 of file one_tree_lower_bound.h.
-#include <hamiltonian_path.h>
Public Member Functions | |
| LatticeMemoryManager () | |
| CostType | ValueAtOffset (uint64 offset) const |
Definition at line 291 of file hamiltonian_path.h.
-#include <linear_assignment.h>
Classes | |
| class | BipartiteLeftNodeIterator |
| std::string | StatsString () const |
Definition at line 226 of file linear_assignment.h.
-#include <linear_assignment.h>
Public Member Functions | |
| BipartiteLeftNodeIterator (const GraphType &graph, NodeIndex num_left_nodes) | |
| void | Next () |
Definition at line 359 of file linear_assignment.h.
-#include <max_flow.h>


Public Types | |
| typedef StarGraph ::NodeIndex | NodeIndex |
| static const FlowQuantity | kMaxFlowQuantity |
Definition at line 652 of file max_flow.h.
-#include <max_flow.h>

Public Types | |
| enum | Status { @@ -87,10 +68,7 @@ Public Types |
Definition at line 300 of file max_flow.h.
-#include <min_cost_flow.h>


Public Types | |
| typedef StarGraph ::NodeIndex | NodeIndex |
| void | SetCheckFeasibility (bool value) |
Definition at line 609 of file min_cost_flow.h.
-#include <min_cost_flow.h>

Public Types | |
| enum | Status { @@ -90,10 +70,7 @@ Public Types |
Definition at line 192 of file min_cost_flow.h.
-#include <ebert_graph.h>
Public Member Functions | |
| PermutationIndexComparisonByArcHead (const ZVector< NodeIndexType > &head) | |
| bool | operator() (ArcIndexType a, ArcIndexType b) const |
Definition at line 519 of file ebert_graph.h.
-#include <max_flow.h>
Public Member Functions | |
| PriorityQueueWithRestrictedPush () | |
| Element | Pop () |
Definition at line 264 of file max_flow.h.
-#include <hamiltonian_path.h>
Public Types | |
| typedef uint32 | Integer |
| CostType | HamiltonianCost (int end_node) |
Definition at line 876 of file hamiltonian_path.h.
-#include <hamiltonian_path.h>
Public Types | |
| typedef Integer | IntegerType |
| static const int | MaxCardinality = 8 * sizeof(Integer) |
Definition at line 127 of file hamiltonian_path.h.
-#include <hamiltonian_path.h>
Public Types | |
| typedef SetRange::SetType | SetType |
| const SetRangeIterator & | operator++ () |
Definition at line 223 of file hamiltonian_path.h.
-#include <hamiltonian_path.h>
Public Types | |
| typedef Set | SetType |
| SetRangeIterator< SetRangeWithCardinality > | end () const |
Definition at line 257 of file hamiltonian_path.h.
-#include <max_flow.h>
Public Types | |
| enum | Status { OPTIMAL, @@ -104,10 +96,7 @@ Public Member Functions |
| void | SetArcCapacity (ArcIndex arc, FlowQuantity capacity) |
Definition at line 152 of file max_flow.h.
-#include <min_cost_flow.h>


Public Types | |
| enum | Status { @@ -130,10 +104,7 @@ Public Member Functions |
| CostValue | UnitCost (ArcIndex arc) const |
Definition at line 213 of file min_cost_flow.h.
-#include <ebert_graph.h>


Classes | |
| class | ArcIterator |
| ZVector< ArcIndexType > | first_incident_arc_ |
Definition at line 213 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| ArcIterator (const DerivedGraph &graph) | |
| ArcIndexType | Index () const |
Definition at line 343 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| NodeIterator (const DerivedGraph &graph) | |
| NodeIndexType | Index () const |
Definition at line 320 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| OutgoingArcIterator (const DerivedGraph &graph, NodeIndexType node) | |
| ArcIndexType | Index () const |
Definition at line 366 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| TailArrayManager (GraphType *g) | |
| void | ReleaseTailArrayIfForwardGraph () const |
Definition at line 1916 of file ebert_graph.h.
-#include <one_tree_lower_bound.h>
Public Member Functions | |
| VolgenantJonkerEvaluator (int number_of_nodes, int max_iterations) | |
| void | OnNewWMax (CostType one_tree_cost) |
Definition at line 153 of file one_tree_lower_bound.h.
-#include <ebert_graph.h>
Public Member Functions | |
| GraphBuilderFromArcs (typename GraphType::NodeIndex max_num_nodes, typename GraphType::ArcIndex max_num_arcs, bool sort_arcs) | |
| GraphType * | Graph (PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler) |
Definition at line 1963 of file ebert_graph.h.
-#include <ebert_graph.h>
Public Member Functions | |
| GraphBuilderFromArcs (typename GraphType::NodeIndex max_num_nodes, typename GraphType::ArcIndex max_num_arcs, bool sort_arcs) | |
| GraphType * | Graph (PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler) |
Definition at line 2023 of file ebert_graph.h.
-#include <graph.h>

Public Types | |
| typedef NodeIndexType | NodeIndex |
| bool | const_capacities_ |
#include <iterators.h>
Public Member Functions | |
| BeginEndReverseIteratorWrapper (const Container &c) | |
| Container::const_reverse_iterator | end () const |
Definition at line 86 of file iterators.h.
-#include <iterators.h>
Public Types | |
| using | const_iterator = Iterator |
| bool | empty () const |
Definition at line 38 of file iterators.h.
-#include <graph.h>


Classes | |
| class | OutgoingArcIterator |
| bool | const_capacities_ |
#include <graph.h>
Public Member Functions | |
| OutgoingArcIterator (const CompleteBipartiteGraph &graph, NodeIndexType node) | |
| void | Next () |
#include <graph.h>


Public Types | |
| typedef NodeIndexType | NodeIndex |
| bool | const_capacities_ |
#include <iterators.h>

