diff --git a/examples/com/google/ortools/samples/FlowExample.java b/examples/com/google/ortools/samples/FlowExample.java index a3a4623b51..8aa4addf82 100644 --- a/examples/com/google/ortools/samples/FlowExample.java +++ b/examples/com/google/ortools/samples/FlowExample.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.samples; import com.google.ortools.graph.MaxFlow; diff --git a/examples/com/google/ortools/samples/IntegerProgramming.java b/examples/com/google/ortools/samples/IntegerProgramming.java index 80ed082587..8bd5554912 100644 --- a/examples/com/google/ortools/samples/IntegerProgramming.java +++ b/examples/com/google/ortools/samples/IntegerProgramming.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.samples; import com.google.ortools.linearsolver.MPConstraint; diff --git a/examples/com/google/ortools/samples/Knapsack.java b/examples/com/google/ortools/samples/Knapsack.java index 5435344eef..777bf1ca7a 100644 --- a/examples/com/google/ortools/samples/Knapsack.java +++ b/examples/com/google/ortools/samples/Knapsack.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.samples; import com.google.ortools.algorithms.KnapsackSolver; diff --git a/examples/com/google/ortools/samples/LinearAssignmentAPI.java b/examples/com/google/ortools/samples/LinearAssignmentAPI.java index 6502d2a9c5..cd60baef2d 100644 --- a/examples/com/google/ortools/samples/LinearAssignmentAPI.java +++ b/examples/com/google/ortools/samples/LinearAssignmentAPI.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.samples; import com.google.ortools.graph.LinearSumAssignment; diff --git a/examples/com/google/ortools/samples/LinearProgramming.java b/examples/com/google/ortools/samples/LinearProgramming.java index d7d4aef0c3..b33b1b67f7 100644 --- a/examples/com/google/ortools/samples/LinearProgramming.java +++ b/examples/com/google/ortools/samples/LinearProgramming.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.samples; import com.google.ortools.linearsolver.MPConstraint; @@ -157,13 +158,13 @@ public class LinearProgramming { } public static void main(String[] args) throws Exception { - System.out.println("---- Linear programming example with GLOP ----"); + System.out.println("---- Linear programming example with GLOP (recommended) ----"); runLinearProgrammingExample("GLOP_LINEAR_PROGRAMMING"); System.out.println("---- Export Linear programming example ----"); exportLinearProgrammingExample("GLOP_LINEAR_PROGRAMMING"); - System.out.println("---- Linear programming example with GLPK ----"); - runLinearProgrammingExample("GLPK_LINEAR_PROGRAMMING"); System.out.println("---- Linear programming example with CLP ----"); runLinearProgrammingExample("CLP_LINEAR_PROGRAMMING"); + System.out.println("---- Linear programming example with GLPK ----"); + runLinearProgrammingExample("GLPK_LINEAR_PROGRAMMING"); } } diff --git a/examples/com/google/ortools/samples/RabbitsPheasants.java b/examples/com/google/ortools/samples/RabbitsPheasants.java index 068d690643..70e492f6e3 100644 --- a/examples/com/google/ortools/samples/RabbitsPheasants.java +++ b/examples/com/google/ortools/samples/RabbitsPheasants.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.samples; import com.google.ortools.constraintsolver.DecisionBuilder; diff --git a/examples/cpp/costas_array.cc b/examples/cpp/costas_array.cc index f3c866581d..e171e41ad5 100644 --- a/examples/cpp/costas_array.cc +++ b/examples/cpp/costas_array.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Costas Array Problem // diff --git a/examples/cpp/cryptarithm.cc b/examples/cpp/cryptarithm.cc index 6e9c6591b7..e8990955f2 100644 --- a/examples/cpp/cryptarithm.cc +++ b/examples/cpp/cryptarithm.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Cryptoarithmetics problem // diff --git a/examples/cpp/cvrptw.cc b/examples/cpp/cvrptw.cc index 0bfc56843e..94fe52676c 100644 --- a/examples/cpp/cvrptw.cc +++ b/examples/cpp/cvrptw.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Capacitated Vehicle Routing Problem with Time Windows (and optional orders). // A description of the problem can be found here: diff --git a/examples/cpp/cvrptw_with_refueling.cc b/examples/cpp/cvrptw_with_refueling.cc index 383a9e09ba..fa12bfa3c3 100644 --- a/examples/cpp/cvrptw_with_refueling.cc +++ b/examples/cpp/cvrptw_with_refueling.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Capacitated Vehicle Routing Problem with Time Windows and refueling // constraints. // This is an extension to the model in cvrptw.cc so refer to that file for diff --git a/examples/cpp/cvrptw_with_resources.cc b/examples/cpp/cvrptw_with_resources.cc index 9e685a9f8b..138f56999c 100644 --- a/examples/cpp/cvrptw_with_resources.cc +++ b/examples/cpp/cvrptw_with_resources.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Capacitated Vehicle Routing Problem with Time Windows and capacitated // resources. // This is an extension to the model in cvrptw.cc so refer to that file for diff --git a/examples/cpp/cvrptw_with_stop_times_and_resources.cc b/examples/cpp/cvrptw_with_stop_times_and_resources.cc index c6d752de9d..391fe313c5 100644 --- a/examples/cpp/cvrptw_with_stop_times_and_resources.cc +++ b/examples/cpp/cvrptw_with_stop_times_and_resources.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Capacitated Vehicle Routing Problem with Time Windows, fixed stop times and // capacitated resources. A stop is defined as consecutive nodes at the same // location. diff --git a/examples/cpp/dimacs_assignment.cc b/examples/cpp/dimacs_assignment.cc index e258b8f7d8..91305d017f 100644 --- a/examples/cpp/dimacs_assignment.cc +++ b/examples/cpp/dimacs_assignment.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include diff --git a/examples/cpp/dobble_ls.cc b/examples/cpp/dobble_ls.cc index bcc7a66ac0..46a6c00f24 100644 --- a/examples/cpp/dobble_ls.cc +++ b/examples/cpp/dobble_ls.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // This problem is inspired by the Dobble game (aka Spot-It in the // USA). In this game, we have 57 cards, 57 symbols, and 8 symbols // per card. We want to assign symbols per card such that any two diff --git a/examples/cpp/flow_api.cc b/examples/cpp/flow_api.cc index 813bfcbfbf..cf9aacca74 100644 --- a/examples/cpp/flow_api.cc +++ b/examples/cpp/flow_api.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/commandlineflags.h" #include "base/logging.h" #include "graph/ebert_graph.h" diff --git a/examples/cpp/golomb.cc b/examples/cpp/golomb.cc index 468cbae6f1..0064a08a25 100644 --- a/examples/cpp/golomb.cc +++ b/examples/cpp/golomb.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Golomb ruler problem // diff --git a/examples/cpp/integer_programming.cc b/examples/cpp/integer_programming.cc index 0c93a8da66..9105993ba0 100644 --- a/examples/cpp/integer_programming.cc +++ b/examples/cpp/integer_programming.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Integer programming example that shows how to use the API. diff --git a/examples/cpp/jobshop.cc b/examples/cpp/jobshop.cc index e3214e5e39..d1439920f1 100644 --- a/examples/cpp/jobshop.cc +++ b/examples/cpp/jobshop.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This model implements a simple jobshop problem. // diff --git a/examples/cpp/jobshop.h b/examples/cpp/jobshop.h index 3dbb6d4d07..c631f428f6 100644 --- a/examples/cpp/jobshop.h +++ b/examples/cpp/jobshop.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This model implements a simple jobshop problem. // diff --git a/examples/cpp/jobshop_ls.cc b/examples/cpp/jobshop_ls.cc index fa4add06a6..1bb30aced7 100644 --- a/examples/cpp/jobshop_ls.cc +++ b/examples/cpp/jobshop_ls.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This model implements a simple jobshop problem. // diff --git a/examples/cpp/jobshop_ls.h b/examples/cpp/jobshop_ls.h index 6f15185cff..4ea1d43eaf 100644 --- a/examples/cpp/jobshop_ls.h +++ b/examples/cpp/jobshop_ls.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This model implements a simple jobshop problem. // // A jobshop is a standard scheduling problem where you must schedule a diff --git a/examples/cpp/linear_assignment_api.cc b/examples/cpp/linear_assignment_api.cc index da07804582..64f6edb54a 100644 --- a/examples/cpp/linear_assignment_api.cc +++ b/examples/cpp/linear_assignment_api.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/commandlineflags.h" #include "base/logging.h" #include "graph/ebert_graph.h" diff --git a/examples/cpp/linear_programming.cc b/examples/cpp/linear_programming.cc index 32e8b15794..8718f8f3e1 100644 --- a/examples/cpp/linear_programming.cc +++ b/examples/cpp/linear_programming.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Linear programming example that shows how to use the API. diff --git a/examples/cpp/linear_solver_protocol_buffers.cc b/examples/cpp/linear_solver_protocol_buffers.cc index a4b95e4926..6c46bc8f2f 100644 --- a/examples/cpp/linear_solver_protocol_buffers.cc +++ b/examples/cpp/linear_solver_protocol_buffers.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/commandlineflags.h" diff --git a/examples/cpp/ls_api.cc b/examples/cpp/ls_api.cc index 333a353270..9ae18526ca 100644 --- a/examples/cpp/ls_api.cc +++ b/examples/cpp/ls_api.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file illustrate the API for Large Neighborhood Search and // Local Search. It solves the same trivial problem with a Large // Neighborhood Search approach, a Local Search approach, and a Local diff --git a/examples/cpp/magic_square.cc b/examples/cpp/magic_square.cc index 681626f8ca..e9ac5ad006 100644 --- a/examples/cpp/magic_square.cc +++ b/examples/cpp/magic_square.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Magic square problem // diff --git a/examples/cpp/model_util.cc b/examples/cpp/model_util.cc index f3d218d30a..f040392778 100644 --- a/examples/cpp/model_util.cc +++ b/examples/cpp/model_util.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/unique_ptr.h" #include "base/commandlineflags.h" diff --git a/examples/cpp/mps_driver.cc b/examples/cpp/mps_driver.cc index 76e15b892f..5c16563359 100644 --- a/examples/cpp/mps_driver.cc +++ b/examples/cpp/mps_driver.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Driver for reading and solving files in the MPS format and in // the linear_solver2.proto format. diff --git a/examples/cpp/multidim_knapsack.cc b/examples/cpp/multidim_knapsack.cc index deed8f188a..785bf036c7 100644 --- a/examples/cpp/multidim_knapsack.cc +++ b/examples/cpp/multidim_knapsack.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This model implements a multidimensional knapsack problem. diff --git a/examples/cpp/network_routing.cc b/examples/cpp/network_routing.cc index 2ab9c094cf..4993306dec 100644 --- a/examples/cpp/network_routing.cc +++ b/examples/cpp/network_routing.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // This model solves a multicommodity mono-routing problem with // capacity constraints and a max usage cost structure. This means // that given a graph with capacity on edges, and a set of demands diff --git a/examples/cpp/nqueens.cc b/examples/cpp/nqueens.cc index 7177f6095f..821ba7f3b2 100644 --- a/examples/cpp/nqueens.cc +++ b/examples/cpp/nqueens.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // N-queens problem // diff --git a/examples/cpp/opb_reader.h b/examples/cpp/opb_reader.h index d004c4692c..ab9929c52e 100644 --- a/examples/cpp/opb_reader.h +++ b/examples/cpp/opb_reader.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_SAT_OPB_READER_H_ #define OR_TOOLS_SAT_OPB_READER_H_ diff --git a/examples/cpp/parse_dimacs_assignment.cc b/examples/cpp/parse_dimacs_assignment.cc index 73c6a8976f..9d0d9f00d7 100644 --- a/examples/cpp/parse_dimacs_assignment.cc +++ b/examples/cpp/parse_dimacs_assignment.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "cpp/parse_dimacs_assignment.h" #include "base/commandlineflags.h" diff --git a/examples/cpp/parse_dimacs_assignment.h b/examples/cpp/parse_dimacs_assignment.h index ed19551cf7..0aaf4c1a92 100644 --- a/examples/cpp/parse_dimacs_assignment.h +++ b/examples/cpp/parse_dimacs_assignment.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Function for reading and parsing a file in DIMACS format: // http://lpsolve.sourceforge.net/5.5/DIMACS_asn.htm diff --git a/examples/cpp/pdptw.cc b/examples/cpp/pdptw.cc index c1deff18d8..e14544cc6d 100644 --- a/examples/cpp/pdptw.cc +++ b/examples/cpp/pdptw.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Pickup and Delivery Problem with Time Windows. // The overall objective is to minimize the length of the routes delivering diff --git a/examples/cpp/print_dimacs_assignment.h b/examples/cpp/print_dimacs_assignment.h index 8105ca22c4..0bee7c33c9 100644 --- a/examples/cpp/print_dimacs_assignment.h +++ b/examples/cpp/print_dimacs_assignment.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Function for outputting an assignment problem in DIMACS format: // http://lpsolve.sourceforge.net/5.5/DIMACS_asn.htm diff --git a/examples/cpp/sat_cnf_reader.h b/examples/cpp/sat_cnf_reader.h index ea4491db07..ea77f98e35 100644 --- a/examples/cpp/sat_cnf_reader.h +++ b/examples/cpp/sat_cnf_reader.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_SAT_SAT_CNF_READER_H_ #define OR_TOOLS_SAT_SAT_CNF_READER_H_ diff --git a/examples/cpp/sat_runner.cc b/examples/cpp/sat_runner.cc index cc1e3b4cd0..c5448e729b 100644 --- a/examples/cpp/sat_runner.cc +++ b/examples/cpp/sat_runner.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include diff --git a/examples/cpp/solve.cc b/examples/cpp/solve.cc index fbb3f9a8b7..a3b78a4d25 100644 --- a/examples/cpp/solve.cc +++ b/examples/cpp/solve.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Command line interface to the MPSolver class. // See linear_solver.h and kUsageStr below. diff --git a/examples/cpp/sports_scheduling.cc b/examples/cpp/sports_scheduling.cc index 3e00e57c58..2b067d2d1e 100644 --- a/examples/cpp/sports_scheduling.cc +++ b/examples/cpp/sports_scheduling.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Sports scheduling problem. // // We want to solve the problem of scheduling of team matches in a diff --git a/examples/cpp/strawberry_fields_with_column_generation.cc b/examples/cpp/strawberry_fields_with_column_generation.cc index 97e779505e..547afe002a 100644 --- a/examples/cpp/strawberry_fields_with_column_generation.cc +++ b/examples/cpp/strawberry_fields_with_column_generation.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Demonstration of column generation using LP toolkit. // // Column generation is the technique of generating columns (aka diff --git a/examples/cpp/tsp.cc b/examples/cpp/tsp.cc index 649d7bd462..10611133fd 100644 --- a/examples/cpp/tsp.cc +++ b/examples/cpp/tsp.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Traveling Salesman Sample. // diff --git a/examples/csharp/cscvrptw.cs b/examples/csharp/cscvrptw.cs index 01d8a452dc..a583d86444 100644 --- a/examples/csharp/cscvrptw.cs +++ b/examples/csharp/cscvrptw.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using System.Collections.Generic; using Google.OrTools.ConstraintSolver; diff --git a/examples/csharp/csflow.cs b/examples/csharp/csflow.cs index 65ccb75549..2420b2c556 100644 --- a/examples/csharp/csflow.cs +++ b/examples/csharp/csflow.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.Graph; diff --git a/examples/csharp/csintegerprogramming.cs b/examples/csharp/csintegerprogramming.cs index 876fda3fd4..3b48b90729 100644 --- a/examples/csharp/csintegerprogramming.cs +++ b/examples/csharp/csintegerprogramming.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.LinearSolver; diff --git a/examples/csharp/csknapsack.cs b/examples/csharp/csknapsack.cs index 9bf79af6a6..17829ee13b 100644 --- a/examples/csharp/csknapsack.cs +++ b/examples/csharp/csknapsack.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.Algorithms; diff --git a/examples/csharp/cslinearprogramming.cs b/examples/csharp/cslinearprogramming.cs index 4fd4b9e11e..f185060ac8 100644 --- a/examples/csharp/cslinearprogramming.cs +++ b/examples/csharp/cslinearprogramming.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.LinearSolver; diff --git a/examples/csharp/csls_api.cs b/examples/csharp/csls_api.cs index 2f6e83a5e0..357a611ca9 100644 --- a/examples/csharp/csls_api.cs +++ b/examples/csharp/csls_api.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.ConstraintSolver; diff --git a/examples/csharp/csrabbitspheasants.cs b/examples/csharp/csrabbitspheasants.cs index 4b6b721aea..3a5af7b92c 100644 --- a/examples/csharp/csrabbitspheasants.cs +++ b/examples/csharp/csrabbitspheasants.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.ConstraintSolver; diff --git a/examples/csharp/cstsp.cs b/examples/csharp/cstsp.cs index e4e482abd0..1e8e48b083 100644 --- a/examples/csharp/cstsp.cs +++ b/examples/csharp/cstsp.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using System.Collections.Generic; using Google.OrTools.ConstraintSolver; diff --git a/examples/csharp/furniture_moving_intervals.cs b/examples/csharp/furniture_moving_intervals.cs index 91e535956f..a397c10bec 100644 --- a/examples/csharp/furniture_moving_intervals.cs +++ b/examples/csharp/furniture_moving_intervals.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using System.Collections; using System.Linq; diff --git a/examples/csharp/organize_day_intervals.cs b/examples/csharp/organize_day_intervals.cs index e8f68afa00..22ffde43d5 100644 --- a/examples/csharp/organize_day_intervals.cs +++ b/examples/csharp/organize_day_intervals.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using System.Collections; using System.IO; diff --git a/examples/tests/issue18.cs b/examples/tests/issue18.cs index 507c164a35..26dbbae853 100644 --- a/examples/tests/issue18.cs +++ b/examples/tests/issue18.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using System.Collections.Generic; using Google.OrTools.ConstraintSolver; diff --git a/examples/tests/issue22.cs b/examples/tests/issue22.cs index 170e771d50..eef4d1b8f0 100644 --- a/examples/tests/issue22.cs +++ b/examples/tests/issue22.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using System.Collections; using System.Collections.Generic; diff --git a/examples/tests/testcp.cs b/examples/tests/testcp.cs index dd30a1b656..db59b27f39 100644 --- a/examples/tests/testcp.cs +++ b/examples/tests/testcp.cs @@ -10,8 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; -using System.Collections.Generic; using Google.OrTools.ConstraintSolver; public class CsTestCpOperator diff --git a/examples/tests/testlp.cs b/examples/tests/testlp.cs index 73e57256cd..b9f566ecf5 100644 --- a/examples/tests/testlp.cs +++ b/examples/tests/testlp.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; using Google.OrTools.LinearSolver; diff --git a/src/algorithms/csharp/knapsack_solver.swig b/src/algorithms/csharp/knapsack_solver.swig index 44dd15f729..dff42d6287 100644 --- a/src/algorithms/csharp/knapsack_solver.swig +++ b/src/algorithms/csharp/knapsack_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user): Refactor this file to adhere to the SWIG style guide. %include util/csharp/data.swig diff --git a/src/algorithms/dense_doubly_linked_list.h b/src/algorithms/dense_doubly_linked_list.h index 056be74dce..68b254ac45 100644 --- a/src/algorithms/dense_doubly_linked_list.h +++ b/src/algorithms/dense_doubly_linked_list.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_ALGORITHMS_DENSE_DOUBLY_LINKED_LIST_H_ #define OR_TOOLS_ALGORITHMS_DENSE_DOUBLY_LINKED_LIST_H_ diff --git a/src/algorithms/dynamic_partition.cc b/src/algorithms/dynamic_partition.cc index 2088a53536..6fdb6a3024 100644 --- a/src/algorithms/dynamic_partition.cc +++ b/src/algorithms/dynamic_partition.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "algorithms/dynamic_partition.h" #include diff --git a/src/algorithms/dynamic_partition.h b/src/algorithms/dynamic_partition.h index de90201a47..29deddf3eb 100644 --- a/src/algorithms/dynamic_partition.h +++ b/src/algorithms/dynamic_partition.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user, fdid): refine this toplevel comment when this file settles. // // Two dynamic partition classes: one that incrementally splits a partition diff --git a/src/algorithms/dynamic_permutation.cc b/src/algorithms/dynamic_permutation.cc index 16210454c6..9be8acf4f7 100644 --- a/src/algorithms/dynamic_permutation.cc +++ b/src/algorithms/dynamic_permutation.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "algorithms/dynamic_permutation.h" #include diff --git a/src/algorithms/dynamic_permutation.h b/src/algorithms/dynamic_permutation.h index 927f2a6d8f..d3ebdd04f2 100644 --- a/src/algorithms/dynamic_permutation.h +++ b/src/algorithms/dynamic_permutation.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_ALGORITHMS_DYNAMIC_PERMUTATION_H_ #define OR_TOOLS_ALGORITHMS_DYNAMIC_PERMUTATION_H_ diff --git a/src/algorithms/find_graph_symmetries.cc b/src/algorithms/find_graph_symmetries.cc index 1788ef25a7..db086116f0 100644 --- a/src/algorithms/find_graph_symmetries.cc +++ b/src/algorithms/find_graph_symmetries.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "algorithms/find_graph_symmetries.h" #include diff --git a/src/algorithms/find_graph_symmetries.h b/src/algorithms/find_graph_symmetries.h index 7effe5e637..527652ecac 100644 --- a/src/algorithms/find_graph_symmetries.h +++ b/src/algorithms/find_graph_symmetries.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user, fdid): Refine this toplevel comment when this file settles. #ifndef OR_TOOLS_ALGORITHMS_FIND_GRAPH_SYMMETRIES_H_ diff --git a/src/algorithms/hungarian.cc b/src/algorithms/hungarian.cc index b85d1da57e..de3cb9ca24 100644 --- a/src/algorithms/hungarian.cc +++ b/src/algorithms/hungarian.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // See: //depot/google3/java/com/google/wireless/genie/frontend // /mixer/matching/HungarianOptimizer.java diff --git a/src/algorithms/hungarian.h b/src/algorithms/hungarian.h index 150f2fc744..7e244c2eaa 100644 --- a/src/algorithms/hungarian.h +++ b/src/algorithms/hungarian.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // IMPORTANT NOTE: we advise to use the code in // graph/linear_assignment.h whose complexity is diff --git a/src/algorithms/java/knapsack_solver.swig b/src/algorithms/java/knapsack_solver.swig index 503a06ae6e..9c6a80f06c 100644 --- a/src/algorithms/java/knapsack_solver.swig +++ b/src/algorithms/java/knapsack_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Java wrapping of ../knapsack_solver.h. See that file. // // USAGE EXAMPLE (which is also used as unit test): diff --git a/src/algorithms/knapsack_solver.cc b/src/algorithms/knapsack_solver.cc index c55add064e..a66b82b4a7 100644 --- a/src/algorithms/knapsack_solver.cc +++ b/src/algorithms/knapsack_solver.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "algorithms/knapsack_solver.h" #include diff --git a/src/algorithms/knapsack_solver.h b/src/algorithms/knapsack_solver.h index ee4054b333..d2786243d0 100644 --- a/src/algorithms/knapsack_solver.h +++ b/src/algorithms/knapsack_solver.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // The aim is to provide a basis for solving knapsack problems: // - 0-1 knapsack problem, diff --git a/src/algorithms/python/knapsack_solver.swig b/src/algorithms/python/knapsack_solver.swig index f83d3884dd..e60cd8a141 100644 --- a/src/algorithms/python/knapsack_solver.swig +++ b/src/algorithms/python/knapsack_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Python wrapping of ../knapsack_solver.h. See that file. // // USAGE EXAMPLES: diff --git a/src/algorithms/sparse_permutation.cc b/src/algorithms/sparse_permutation.cc index d7eadcdc59..a3e0813f63 100644 --- a/src/algorithms/sparse_permutation.cc +++ b/src/algorithms/sparse_permutation.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "algorithms/sparse_permutation.h" #include diff --git a/src/algorithms/sparse_permutation.h b/src/algorithms/sparse_permutation.h index e3f67329ee..e1c0b51607 100644 --- a/src/algorithms/sparse_permutation.h +++ b/src/algorithms/sparse_permutation.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_ALGORITHMS_SPARSE_PERMUTATION_H_ #define OR_TOOLS_ALGORITHMS_SPARSE_PERMUTATION_H_ diff --git a/src/base/accurate_sum.h b/src/base/accurate_sum.h index 9d73e3f36a..44cacd3105 100644 --- a/src/base/accurate_sum.h +++ b/src/base/accurate_sum.h @@ -12,6 +12,7 @@ // limitations under the License. + #ifndef OR_TOOLS_BASE_ACCURATE_SUM_H_ #define OR_TOOLS_BASE_ACCURATE_SUM_H_ diff --git a/src/base/adjustable_priority_queue-inl.h b/src/base/adjustable_priority_queue-inl.h index eea03e64a6..7586f94af4 100644 --- a/src/base/adjustable_priority_queue-inl.h +++ b/src/base/adjustable_priority_queue-inl.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_INL_H_ #define OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_INL_H_ diff --git a/src/base/base.swig b/src/base/base.swig index 06c9ef249a..b3718f5f88 100644 --- a/src/base/base.swig +++ b/src/base/base.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifdef SWIGPYTHON #pragma SWIG nowarn=312,451,454,503,362 diff --git a/src/base/encodingutils.h b/src/base/encodingutils.h index 023ad8a031..84c9523888 100644 --- a/src/base/encodingutils.h +++ b/src/base/encodingutils.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_ENCODINGUTILS_H_ #define OR_TOOLS_BASE_ENCODINGUTILS_H_ diff --git a/src/base/fingerprint2011.h b/src/base/fingerprint2011.h index 17623396a5..52f9e2a1d7 100644 --- a/src/base/fingerprint2011.h +++ b/src/base/fingerprint2011.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_FINGERPRINT2011_H_ #define OR_TOOLS_BASE_FINGERPRINT2011_H_ diff --git a/src/base/murmur.h b/src/base/murmur.h index fa40d57963..ffc3e72582 100644 --- a/src/base/murmur.h +++ b/src/base/murmur.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_MURMUR_H_ #define OR_TOOLS_BASE_MURMUR_H_ diff --git a/src/base/port.h b/src/base/port.h index f41913339d..e142c08984 100644 --- a/src/base/port.h +++ b/src/base/port.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_PORT_H_ #define OR_TOOLS_BASE_PORT_H_ diff --git a/src/base/python-swig.h b/src/base/python-swig.h index 730062b954..665dfb55d6 100644 --- a/src/base/python-swig.h +++ b/src/base/python-swig.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Static part of SWIG-generated C++ wrapper for Python (_module_name.cc). // // This file should only be included in base.swig inside Python-specific part: diff --git a/src/base/python/callbacks.swig b/src/base/python/callbacks.swig index bd54832e79..2f8dcdea54 100644 --- a/src/base/python/callbacks.swig +++ b/src/base/python/callbacks.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // SWIG wrapping of some Callbacks in python. // This doesn't directly expose a C++ API; rather it provides typemaps that can // be used by other .swig files to easily expose APIs that use callbacks. diff --git a/src/base/small_map.h b/src/base/small_map.h index e6ddfcea69..44c108153e 100644 --- a/src/base/small_map.h +++ b/src/base/small_map.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_SMALL_MAP_H_ #define OR_TOOLS_BASE_SMALL_MAP_H_ diff --git a/src/base/small_ordered_set.h b/src/base/small_ordered_set.h index 176c9f0915..79e6339f91 100644 --- a/src/base/small_ordered_set.h +++ b/src/base/small_ordered_set.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_SMALL_ORDERED_SET_H_ #define OR_TOOLS_BASE_SMALL_ORDERED_SET_H_ diff --git a/src/base/sparse_hash.h b/src/base/sparse_hash.h index dfec4560f9..268e90cdab 100644 --- a/src/base/sparse_hash.h +++ b/src/base/sparse_hash.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // An all-in one inclusion (for simplicity) of the {dense,sparse}_hash_{map,set} // files in the Google sparsehash open-source library. diff --git a/src/base/status.h b/src/base/status.h index d8de188b2d..20e3ed1603 100644 --- a/src/base/status.h +++ b/src/base/status.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_STATUS_H_ #define OR_TOOLS_BASE_STATUS_H_ diff --git a/src/base/statusor.h b/src/base/statusor.h index c57c933ba0..96ea091f3b 100644 --- a/src/base/statusor.h +++ b/src/base/statusor.h @@ -1,3 +1,16 @@ +// Copyright 2010-2014 Google +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #ifndef OR_TOOLS_BASE_STATUSOR_H_ #define OR_TOOLS_BASE_STATUSOR_H_ diff --git a/src/base/time_support.cc b/src/base/time_support.cc index 2b1d23cdad..497a92f4f2 100644 --- a/src/base/time_support.cc +++ b/src/base/time_support.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "base/time_support.h" #if !defined(_MSC_VER) diff --git a/src/base/time_support.h b/src/base/time_support.h index fd5c15957e..0b3bd1b990 100644 --- a/src/base/time_support.h +++ b/src/base/time_support.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_BASE_TIME_SUPPORT_H_ #define OR_TOOLS_BASE_TIME_SUPPORT_H_ diff --git a/src/com/google/ortools/constraintsolver/IntArrayHelper.cs b/src/com/google/ortools/constraintsolver/IntArrayHelper.cs index ddab050ff5..67b9b47318 100644 --- a/src/com/google/ortools/constraintsolver/IntArrayHelper.cs +++ b/src/com/google/ortools/constraintsolver/IntArrayHelper.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools.ConstraintSolver { using System; using System.Collections.Generic; diff --git a/src/com/google/ortools/constraintsolver/IntVarArrayHelper.cs b/src/com/google/ortools/constraintsolver/IntVarArrayHelper.cs index 6a826d3834..aac7a363f6 100644 --- a/src/com/google/ortools/constraintsolver/IntVarArrayHelper.cs +++ b/src/com/google/ortools/constraintsolver/IntVarArrayHelper.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools.ConstraintSolver { using System; diff --git a/src/com/google/ortools/constraintsolver/IntervalVarArrayHelper.cs b/src/com/google/ortools/constraintsolver/IntervalVarArrayHelper.cs index 65689c396f..ec817cdccf 100644 --- a/src/com/google/ortools/constraintsolver/IntervalVarArrayHelper.cs +++ b/src/com/google/ortools/constraintsolver/IntervalVarArrayHelper.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools.ConstraintSolver { using System; diff --git a/src/com/google/ortools/constraintsolver/JavaDecisionBuilder.java b/src/com/google/ortools/constraintsolver/JavaDecisionBuilder.java index 7118bf4e8d..ca689fd8f0 100644 --- a/src/com/google/ortools/constraintsolver/JavaDecisionBuilder.java +++ b/src/com/google/ortools/constraintsolver/JavaDecisionBuilder.java @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + package com.google.ortools.constraintsolver; /** diff --git a/src/com/google/ortools/constraintsolver/NetDecisionBuilder.cs b/src/com/google/ortools/constraintsolver/NetDecisionBuilder.cs index 006904e63d..b100e132ba 100644 --- a/src/com/google/ortools/constraintsolver/NetDecisionBuilder.cs +++ b/src/com/google/ortools/constraintsolver/NetDecisionBuilder.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + using System; namespace Google.OrTools.ConstraintSolver diff --git a/src/com/google/ortools/constraintsolver/ValCstPair.cs b/src/com/google/ortools/constraintsolver/ValCstPair.cs index 1080243d28..4c0e0e224f 100644 --- a/src/com/google/ortools/constraintsolver/ValCstPair.cs +++ b/src/com/google/ortools/constraintsolver/ValCstPair.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools.ConstraintSolver { using System; diff --git a/src/com/google/ortools/linearsolver/LinearConstraint.cs b/src/com/google/ortools/linearsolver/LinearConstraint.cs index e01085b525..4c20eceb58 100644 --- a/src/com/google/ortools/linearsolver/LinearConstraint.cs +++ b/src/com/google/ortools/linearsolver/LinearConstraint.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools.LinearSolver { using System; diff --git a/src/com/google/ortools/linearsolver/LinearExpr.cs b/src/com/google/ortools/linearsolver/LinearExpr.cs index 97d3526e48..d0cb760f4c 100644 --- a/src/com/google/ortools/linearsolver/LinearExpr.cs +++ b/src/com/google/ortools/linearsolver/LinearExpr.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools.LinearSolver { using System; diff --git a/src/com/google/ortools/util/NestedArrayHelper.cs b/src/com/google/ortools/util/NestedArrayHelper.cs index d316bf3cd1..763094e4c1 100644 --- a/src/com/google/ortools/util/NestedArrayHelper.cs +++ b/src/com/google/ortools/util/NestedArrayHelper.cs @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + namespace Google.OrTools { using System; diff --git a/src/constraint_solver/alldiff_cst.cc b/src/constraint_solver/alldiff_cst.cc index 79bab31d8b..1e4ccfab3e 100644 --- a/src/constraint_solver/alldiff_cst.cc +++ b/src/constraint_solver/alldiff_cst.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // AllDifferent constraints diff --git a/src/constraint_solver/assignment.cc b/src/constraint_solver/assignment.cc index 2451ca6767..a382def310 100644 --- a/src/constraint_solver/assignment.cc +++ b/src/constraint_solver/assignment.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include diff --git a/src/constraint_solver/assignment.proto b/src/constraint_solver/assignment.proto index b5b10a18dc..f1feb8b4f9 100644 --- a/src/constraint_solver/assignment.proto +++ b/src/constraint_solver/assignment.proto @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + syntax = "proto2"; package operations_research; diff --git a/src/constraint_solver/collect_variables.cc b/src/constraint_solver/collect_variables.cc index 3d76a55616..b5ad4f4531 100644 --- a/src/constraint_solver/collect_variables.cc +++ b/src/constraint_solver/collect_variables.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include diff --git a/src/constraint_solver/constraint_solver.cc b/src/constraint_solver/constraint_solver.cc index 629dd9ab78..d6b711f698 100644 --- a/src/constraint_solver/constraint_solver.cc +++ b/src/constraint_solver/constraint_solver.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This file implements the core objects of the constraint solver: // Solver, Search, Queue, ... along with the main resolution loop. diff --git a/src/constraint_solver/constraint_solver.h b/src/constraint_solver/constraint_solver.h index 7362f9e933..66d47ee27d 100644 --- a/src/constraint_solver/constraint_solver.h +++ b/src/constraint_solver/constraint_solver.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Declaration of the core objects for the constraint solver. // The literature around constraint programming is extremelly dense but one diff --git a/src/constraint_solver/constraint_solveri.h b/src/constraint_solver/constraint_solveri.h index 78a69dd475..9ebf81de42 100644 --- a/src/constraint_solver/constraint_solveri.h +++ b/src/constraint_solver/constraint_solveri.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Collection of objects used to extend the Constraint Solver library. // // This file contains a set of objects that simplifies writing extensions diff --git a/src/constraint_solver/constraints.cc b/src/constraint_solver/constraints.cc index 4f634fb599..9b2b2cd702 100644 --- a/src/constraint_solver/constraints.cc +++ b/src/constraint_solver/constraints.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include "base/unique_ptr.h" diff --git a/src/constraint_solver/count_cst.cc b/src/constraint_solver/count_cst.cc index 121f7cc84b..a47e6e72fc 100644 --- a/src/constraint_solver/count_cst.cc +++ b/src/constraint_solver/count_cst.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Count constraints diff --git a/src/constraint_solver/csharp/constraint_solver.swig b/src/constraint_solver/csharp/constraint_solver.swig index 4faf1d8039..c55f25b816 100644 --- a/src/constraint_solver/csharp/constraint_solver.swig +++ b/src/constraint_solver/csharp/constraint_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user): Refactor this file to adhere to the SWIG style guide. %include exception.i @@ -947,6 +948,7 @@ namespace operations_research { } return result; } + public int[] OldSequence(int index) { int size = OldSequenceSize(index); int[] result = new int[size]; diff --git a/src/constraint_solver/csharp/routing.swig b/src/constraint_solver/csharp/routing.swig index 02d6136c6f..cbd26aef6d 100644 --- a/src/constraint_solver/csharp/routing.swig +++ b/src/constraint_solver/csharp/routing.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user): Refactor this file to adhere to the SWIG style guide. %include "constraint_solver/csharp/constraint_solver.swig" diff --git a/src/constraint_solver/default_search.cc b/src/constraint_solver/default_search.cc index 766d8d2ca4..8e327e31eb 100644 --- a/src/constraint_solver/default_search.cc +++ b/src/constraint_solver/default_search.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include diff --git a/src/constraint_solver/demon_profiler.cc b/src/constraint_solver/demon_profiler.cc index d0e6f22a87..1ff95a7f60 100644 --- a/src/constraint_solver/demon_profiler.cc +++ b/src/constraint_solver/demon_profiler.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include diff --git a/src/constraint_solver/demon_profiler.proto b/src/constraint_solver/demon_profiler.proto index feddec1784..34f5044cda 100644 --- a/src/constraint_solver/demon_profiler.proto +++ b/src/constraint_solver/demon_profiler.proto @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + syntax = "proto2"; package operations_research; diff --git a/src/constraint_solver/dependency_graph.cc b/src/constraint_solver/dependency_graph.cc index 5113d7e044..7af7d8e487 100644 --- a/src/constraint_solver/dependency_graph.cc +++ b/src/constraint_solver/dependency_graph.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include diff --git a/src/constraint_solver/deviation.cc b/src/constraint_solver/deviation.cc index 9a1e9b7810..9943f66869 100644 --- a/src/constraint_solver/deviation.cc +++ b/src/constraint_solver/deviation.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include "base/unique_ptr.h" diff --git a/src/constraint_solver/diffn.cc b/src/constraint_solver/diffn.cc index b80e141532..89ae545cbf 100644 --- a/src/constraint_solver/diffn.cc +++ b/src/constraint_solver/diffn.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include diff --git a/src/constraint_solver/element.cc b/src/constraint_solver/element.cc index 24c40bfeb2..52c675e674 100644 --- a/src/constraint_solver/element.cc +++ b/src/constraint_solver/element.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/unique_ptr.h" #include diff --git a/src/constraint_solver/expr_array.cc b/src/constraint_solver/expr_array.cc index 00959f3f17..09ddf99761 100644 --- a/src/constraint_solver/expr_array.cc +++ b/src/constraint_solver/expr_array.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Array Expression constraints diff --git a/src/constraint_solver/expr_cst.cc b/src/constraint_solver/expr_cst.cc index 3f8a23dd49..e8582f1da6 100644 --- a/src/constraint_solver/expr_cst.cc +++ b/src/constraint_solver/expr_cst.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Expression constraints diff --git a/src/constraint_solver/expressions.cc b/src/constraint_solver/expressions.cc index fe8bf0c43a..ac30e4da57 100644 --- a/src/constraint_solver/expressions.cc +++ b/src/constraint_solver/expressions.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include "base/hash.h" diff --git a/src/constraint_solver/graph_constraints.cc b/src/constraint_solver/graph_constraints.cc index f91004434f..43caffdaff 100644 --- a/src/constraint_solver/graph_constraints.cc +++ b/src/constraint_solver/graph_constraints.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/unique_ptr.h" #include diff --git a/src/constraint_solver/hybrid.cc b/src/constraint_solver/hybrid.cc index a577b91c44..fe8b139033 100644 --- a/src/constraint_solver/hybrid.cc +++ b/src/constraint_solver/hybrid.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "constraint_solver/hybrid.h" #include diff --git a/src/constraint_solver/hybrid.h b/src/constraint_solver/hybrid.h index 404ea5b3b4..9044930835 100644 --- a/src/constraint_solver/hybrid.h +++ b/src/constraint_solver/hybrid.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_CONSTRAINT_SOLVER_HYBRID_H_ #define OR_TOOLS_CONSTRAINT_SOLVER_HYBRID_H_ diff --git a/src/constraint_solver/interval.cc b/src/constraint_solver/interval.cc index 704664be74..ee31789d16 100644 --- a/src/constraint_solver/interval.cc +++ b/src/constraint_solver/interval.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include diff --git a/src/constraint_solver/io.cc b/src/constraint_solver/io.cc index 4d7a101869..9fc52e7aa6 100644 --- a/src/constraint_solver/io.cc +++ b/src/constraint_solver/io.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include "base/hash.h" diff --git a/src/constraint_solver/java/constraint_solver.swig b/src/constraint_solver/java/constraint_solver.swig index edb0924517..dc809f41f1 100644 --- a/src/constraint_solver/java/constraint_solver.swig +++ b/src/constraint_solver/java/constraint_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user): Refactor this file to adhere to the SWIG style guide. %include enumsimple.swg diff --git a/src/constraint_solver/java/routing.swig b/src/constraint_solver/java/routing.swig index 4f0564b50e..e6c690bb51 100644 --- a/src/constraint_solver/java/routing.swig +++ b/src/constraint_solver/java/routing.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user): Refactor this file to adhere to the SWIG style guide. %include "constraint_solver/java/constraint_solver.swig" diff --git a/src/constraint_solver/local_search.cc b/src/constraint_solver/local_search.cc index ec0b428116..bdfc2269f5 100644 --- a/src/constraint_solver/local_search.cc +++ b/src/constraint_solver/local_search.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include "base/hash.h" diff --git a/src/constraint_solver/model.proto b/src/constraint_solver/model.proto index 9ce8757add..81b15eb57a 100644 --- a/src/constraint_solver/model.proto +++ b/src/constraint_solver/model.proto @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + syntax = "proto2"; import "constraint_solver/search_limit.proto"; diff --git a/src/constraint_solver/model_cache.cc b/src/constraint_solver/model_cache.cc index fb15f2c28d..ba2e5ff728 100644 --- a/src/constraint_solver/model_cache.cc +++ b/src/constraint_solver/model_cache.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include diff --git a/src/constraint_solver/mtsearch.cc b/src/constraint_solver/mtsearch.cc index 09ccbe7445..2cc36d85fb 100644 --- a/src/constraint_solver/mtsearch.cc +++ b/src/constraint_solver/mtsearch.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/unique_ptr.h" diff --git a/src/constraint_solver/nogoods.cc b/src/constraint_solver/nogoods.cc index 3e433d21f3..c84934e1d8 100644 --- a/src/constraint_solver/nogoods.cc +++ b/src/constraint_solver/nogoods.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include diff --git a/src/constraint_solver/pack.cc b/src/constraint_solver/pack.cc index e53acba66d..84b8e13b55 100644 --- a/src/constraint_solver/pack.cc +++ b/src/constraint_solver/pack.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Packing constraints #include diff --git a/src/constraint_solver/python/constraint_solver.swig b/src/constraint_solver/python/constraint_solver.swig index 788fb61e8e..d3e17e8c58 100644 --- a/src/constraint_solver/python/constraint_solver.swig +++ b/src/constraint_solver/python/constraint_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This .swig file exposes the code declared in ../constraint_solver.h and // ../constraint_solveri.h. // diff --git a/src/constraint_solver/python/pywrapcp_util.h b/src/constraint_solver/python/pywrapcp_util.h index 39f3722471..c8b947c2f3 100644 --- a/src/constraint_solver/python/pywrapcp_util.h +++ b/src/constraint_solver/python/pywrapcp_util.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This .h file cannot be used in isolation! // It represents some of the inlined C++ content of ./constraint_solver.swig, // and was split out because it's a large enough chunk of C++ code. diff --git a/src/constraint_solver/python/routing.swig b/src/constraint_solver/python/routing.swig index b17d19674a..850cfb6f85 100644 --- a/src/constraint_solver/python/routing.swig +++ b/src/constraint_solver/python/routing.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // TODO(user): Refactor this file to adhere to the SWIG style guide. %include "constraint_solver/python/constraint_solver.swig" diff --git a/src/constraint_solver/range_cst.cc b/src/constraint_solver/range_cst.cc index b25467e31c..21f7e50a42 100644 --- a/src/constraint_solver/range_cst.cc +++ b/src/constraint_solver/range_cst.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Range constraints diff --git a/src/constraint_solver/resource.cc b/src/constraint_solver/resource.cc index ba76ffd5f7..e0472c0522 100644 --- a/src/constraint_solver/resource.cc +++ b/src/constraint_solver/resource.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // This file contains implementations of several resource constraints. // The implemented constraints are: // * Disjunctive: forces a set of intervals to be non-overlapping diff --git a/src/constraint_solver/routing.cc b/src/constraint_solver/routing.cc index eadbc6c26a..8788a7121b 100644 --- a/src/constraint_solver/routing.cc +++ b/src/constraint_solver/routing.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "constraint_solver/routing.h" #include diff --git a/src/constraint_solver/routing.h b/src/constraint_solver/routing.h index 4ca03dbf08..df9de9f09f 100644 --- a/src/constraint_solver/routing.h +++ b/src/constraint_solver/routing.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // The vehicle routing library lets one model and solve generic vehicle routing // problems ranging from the Traveling Salesman Problem to more complex // problems such as the Capacitated Vehicle Routing Problem with Time Windows. diff --git a/src/constraint_solver/routing_search.cc b/src/constraint_solver/routing_search.cc index cdf222ae13..000d101333 100644 --- a/src/constraint_solver/routing_search.cc +++ b/src/constraint_solver/routing_search.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Implementation of all classes related to routing and search. // This includes decision builders, local search neighborhood operators // and local search filters. diff --git a/src/constraint_solver/sat_constraint.cc b/src/constraint_solver/sat_constraint.cc index ef76ea2e0d..f8bc1f34a6 100644 --- a/src/constraint_solver/sat_constraint.cc +++ b/src/constraint_solver/sat_constraint.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "constraint_solver/sat_constraint.h" namespace operations_research { diff --git a/src/constraint_solver/sat_constraint.h b/src/constraint_solver/sat_constraint.h index c82aa40725..e731bc56cc 100644 --- a/src/constraint_solver/sat_constraint.h +++ b/src/constraint_solver/sat_constraint.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file contains the definition and implementation of a constraint // encapsulating a full SAT solver. Such a constraint can basically propagates // any relationship between Boolean variables that can be expressed using diff --git a/src/constraint_solver/sched_constraints.cc b/src/constraint_solver/sched_constraints.cc index f6873d05f1..9363925496 100644 --- a/src/constraint_solver/sched_constraints.cc +++ b/src/constraint_solver/sched_constraints.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file contains implementations of several scheduling constraints. // The implemented constraints are: // diff --git a/src/constraint_solver/sched_expr.cc b/src/constraint_solver/sched_expr.cc index 899da30bde..5f65857064 100644 --- a/src/constraint_solver/sched_expr.cc +++ b/src/constraint_solver/sched_expr.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include diff --git a/src/constraint_solver/sched_search.cc b/src/constraint_solver/sched_search.cc index 7f2b2f740e..df9946c02f 100644 --- a/src/constraint_solver/sched_search.cc +++ b/src/constraint_solver/sched_search.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include diff --git a/src/constraint_solver/search.cc b/src/constraint_solver/search.cc index 15d828a2e0..f5caa39784 100644 --- a/src/constraint_solver/search.cc +++ b/src/constraint_solver/search.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include diff --git a/src/constraint_solver/search_limit.proto b/src/constraint_solver/search_limit.proto index 8f685c2d1e..985f0d464d 100644 --- a/src/constraint_solver/search_limit.proto +++ b/src/constraint_solver/search_limit.proto @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This file contains a protocol buffer definition for search limits. diff --git a/src/constraint_solver/table.cc b/src/constraint_solver/table.cc index a12a67dad3..90eb9a14df 100644 --- a/src/constraint_solver/table.cc +++ b/src/constraint_solver/table.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This file implements the table constraints. diff --git a/src/constraint_solver/timetabling.cc b/src/constraint_solver/timetabling.cc index 30e4500687..5793981193 100644 --- a/src/constraint_solver/timetabling.cc +++ b/src/constraint_solver/timetabling.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/integral_types.h" diff --git a/src/constraint_solver/trace.cc b/src/constraint_solver/trace.cc index f6e63788ff..a1b91240f6 100644 --- a/src/constraint_solver/trace.cc +++ b/src/constraint_solver/trace.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include "base/hash.h" diff --git a/src/constraint_solver/tree_monitor.cc b/src/constraint_solver/tree_monitor.cc index 0dda61ef5b..016926d822 100644 --- a/src/constraint_solver/tree_monitor.cc +++ b/src/constraint_solver/tree_monitor.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include diff --git a/src/constraint_solver/utilities.cc b/src/constraint_solver/utilities.cc index af17d1a22f..88fecf0a83 100644 --- a/src/constraint_solver/utilities.cc +++ b/src/constraint_solver/utilities.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/hash.h" #include "base/hash.h" #include diff --git a/src/constraint_solver/visitor.cc b/src/constraint_solver/visitor.cc index b808fa334a..9a3fc1344f 100644 --- a/src/constraint_solver/visitor.cc +++ b/src/constraint_solver/visitor.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/hash.h" #include "base/hash.h" diff --git a/src/glop/basis_representation.cc b/src/glop/basis_representation.cc index 4d56f013d9..d83653b1e4 100644 --- a/src/glop/basis_representation.cc +++ b/src/glop/basis_representation.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/basis_representation.h" #include "base/stl_util.h" diff --git a/src/glop/basis_representation.h b/src/glop/basis_representation.h index fa1dd5ee88..b09fd606a3 100644 --- a/src/glop/basis_representation.h +++ b/src/glop/basis_representation.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_ #define OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_ diff --git a/src/glop/dual_edge_norms.cc b/src/glop/dual_edge_norms.cc index b4d720ee14..bbe48ce767 100644 --- a/src/glop/dual_edge_norms.cc +++ b/src/glop/dual_edge_norms.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/dual_edge_norms.h" #include "glop/lp_utils.h" diff --git a/src/glop/dual_edge_norms.h b/src/glop/dual_edge_norms.h index 43f0276236..e53a6474d7 100644 --- a/src/glop/dual_edge_norms.h +++ b/src/glop/dual_edge_norms.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_DUAL_EDGE_NORMS_H_ #define OR_TOOLS_GLOP_DUAL_EDGE_NORMS_H_ diff --git a/src/glop/entering_variable.cc b/src/glop/entering_variable.cc index 925f3c9fc3..359f3ae3d5 100644 --- a/src/glop/entering_variable.cc +++ b/src/glop/entering_variable.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/entering_variable.h" #include diff --git a/src/glop/entering_variable.h b/src/glop/entering_variable.h index 4e7ebbb952..172c565550 100644 --- a/src/glop/entering_variable.h +++ b/src/glop/entering_variable.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_ENTERING_VARIABLE_H_ #define OR_TOOLS_GLOP_ENTERING_VARIABLE_H_ diff --git a/src/glop/initial_basis.cc b/src/glop/initial_basis.cc index ffd7a75d2b..d9fe379465 100644 --- a/src/glop/initial_basis.cc +++ b/src/glop/initial_basis.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "glop/initial_basis.h" diff --git a/src/glop/initial_basis.h b/src/glop/initial_basis.h index 83b036541f..85749d19be 100644 --- a/src/glop/initial_basis.h +++ b/src/glop/initial_basis.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_INITIAL_BASIS_H_ #define OR_TOOLS_GLOP_INITIAL_BASIS_H_ diff --git a/src/glop/lp_data.cc b/src/glop/lp_data.cc index c18c9e95e8..2b4beb467e 100644 --- a/src/glop/lp_data.cc +++ b/src/glop/lp_data.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/lp_data.h" #include diff --git a/src/glop/lp_data.h b/src/glop/lp_data.h index f69852e24f..03e81a77ff 100644 --- a/src/glop/lp_data.h +++ b/src/glop/lp_data.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Storage classes for Linear Programs. // LinearProgram stores the complete data for a Linear Program: diff --git a/src/glop/lp_print_utils.cc b/src/glop/lp_print_utils.cc index bef8ca14ef..d170c79c13 100644 --- a/src/glop/lp_print_utils.cc +++ b/src/glop/lp_print_utils.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/lp_print_utils.h" #include diff --git a/src/glop/lp_print_utils.h b/src/glop/lp_print_utils.h index 9d9d2596a0..aec5238f45 100644 --- a/src/glop/lp_print_utils.h +++ b/src/glop/lp_print_utils.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Utilities to display linear expression in a human-readable way. #ifndef OR_TOOLS_GLOP_LP_PRINT_UTILS_H_ diff --git a/src/glop/lp_solver.cc b/src/glop/lp_solver.cc index bbbcf0e7bc..cf0d3bc62f 100644 --- a/src/glop/lp_solver.cc +++ b/src/glop/lp_solver.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/lp_solver.h" #include @@ -124,7 +125,9 @@ ProblemStatus LPSolver::Solve(const LinearProgram& lp) { // crash. ScopedFloatingPointEnv scoped_fenv; if (FLAGS_lp_solver_enable_fp_exceptions) { -#if !defined(_MSC_VER) +#ifdef _MSC_VER + scoped_fenv.EnableExceptions(_EM_INVALID | EM_ZERODIVIDE); +#else scoped_fenv.EnableExceptions(FE_DIVBYZERO | FE_INVALID); #endif } diff --git a/src/glop/lp_solver.h b/src/glop/lp_solver.h index 8ee081e962..09fbfaa7cf 100644 --- a/src/glop/lp_solver.h +++ b/src/glop/lp_solver.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_LP_SOLVER_H_ #define OR_TOOLS_GLOP_LP_SOLVER_H_ diff --git a/src/glop/lp_types.cc b/src/glop/lp_types.cc index 35dbf66a47..fd386e84e8 100644 --- a/src/glop/lp_types.cc +++ b/src/glop/lp_types.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/lp_types.h" namespace operations_research { diff --git a/src/glop/lp_types.h b/src/glop/lp_types.h index e31a75666b..13a9134ffe 100644 --- a/src/glop/lp_types.h +++ b/src/glop/lp_types.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Common types and constants used by the Linear Programming solver. #ifndef OR_TOOLS_GLOP_LP_TYPES_H_ diff --git a/src/glop/lp_utils.cc b/src/glop/lp_utils.cc index b324b03bc4..4a642280f3 100644 --- a/src/glop/lp_utils.cc +++ b/src/glop/lp_utils.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/lp_utils.h" namespace operations_research { diff --git a/src/glop/lp_utils.h b/src/glop/lp_utils.h index 2e433e0aeb..66bdc0e547 100644 --- a/src/glop/lp_utils.h +++ b/src/glop/lp_utils.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Basic utility functions on Fractional or row/column of Fractional. #ifndef OR_TOOLS_GLOP_LP_UTILS_H_ diff --git a/src/glop/lu_factorization.cc b/src/glop/lu_factorization.cc index 0689282cbc..041a8f4653 100644 --- a/src/glop/lu_factorization.cc +++ b/src/glop/lu_factorization.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/lu_factorization.h" #include "glop/lp_utils.h" diff --git a/src/glop/lu_factorization.h b/src/glop/lu_factorization.h index fdfeb57675..857db38f15 100644 --- a/src/glop/lu_factorization.h +++ b/src/glop/lu_factorization.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/markowitz.h" #include "glop/parameters.pb.h" #include "glop/sparse.h" diff --git a/src/glop/markowitz.cc b/src/glop/markowitz.cc index 47d8363941..5fcc95ba80 100644 --- a/src/glop/markowitz.cc +++ b/src/glop/markowitz.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/markowitz.h" #include diff --git a/src/glop/markowitz.h b/src/glop/markowitz.h index 987bf07fb2..ffea067be4 100644 --- a/src/glop/markowitz.h +++ b/src/glop/markowitz.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // LU decomposition algorithm of a sparse matrix B with Markowitz pivot // selection strategy. The algorithm constructs a lower matrix L, upper matrix // U, row permutation P and a column permutation Q such that L.U = P.B.Q^{-1}. diff --git a/src/glop/matrix_scaler.cc b/src/glop/matrix_scaler.cc index 3ad1858586..44c903ee31 100644 --- a/src/glop/matrix_scaler.cc +++ b/src/glop/matrix_scaler.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/matrix_scaler.h" #include diff --git a/src/glop/matrix_scaler.h b/src/glop/matrix_scaler.h index c008cfaf3a..1f3158bcfa 100644 --- a/src/glop/matrix_scaler.h +++ b/src/glop/matrix_scaler.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // The SparseMatrixScaler class provides tools to scale a SparseMatrix, i.e. // reduce the range of its coefficients and make for each column and each row // the maximum magnitude of its coefficients equal to 1. diff --git a/src/glop/matrix_utils.cc b/src/glop/matrix_utils.cc index 816cb9ae29..67154cf511 100644 --- a/src/glop/matrix_utils.cc +++ b/src/glop/matrix_utils.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/matrix_utils.h" #include #include "base/hash.h" diff --git a/src/glop/matrix_utils.h b/src/glop/matrix_utils.h index 62d6f6e7d1..86b7182231 100644 --- a/src/glop/matrix_utils.h +++ b/src/glop/matrix_utils.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_MATRIX_UTILS_H_ #define OR_TOOLS_GLOP_MATRIX_UTILS_H_ diff --git a/src/glop/mps_driver.cc b/src/glop/mps_driver.cc index 76e15b892f..5c16563359 100644 --- a/src/glop/mps_driver.cc +++ b/src/glop/mps_driver.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Driver for reading and solving files in the MPS format and in // the linear_solver2.proto format. diff --git a/src/glop/mps_reader.cc b/src/glop/mps_reader.cc index a52320c472..c1d81fc12e 100644 --- a/src/glop/mps_reader.cc +++ b/src/glop/mps_reader.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/mps_reader.h" #include diff --git a/src/glop/mps_reader.h b/src/glop/mps_reader.h index f0b0ef573e..444429dfbd 100644 --- a/src/glop/mps_reader.h +++ b/src/glop/mps_reader.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // A reader for files in the MPS format. // see http://lpsolve.sourceforge.net/5.5/mps-format.htm // and http://www.ici.ro/camo/language/ml11.htm diff --git a/src/glop/mps_to_png.cc b/src/glop/mps_to_png.cc index 4bcc1df268..89a22a5445 100644 --- a/src/glop/mps_to_png.cc +++ b/src/glop/mps_to_png.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Utility to dump the fill-in layout of the constraint matrix of a MPS file // to a PNG file. diff --git a/src/glop/parameters.proto b/src/glop/parameters.proto index 1304acd770..4a9faaa436 100644 --- a/src/glop/parameters.proto +++ b/src/glop/parameters.proto @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Contains the definitions for all the GLOP algorithm parameters and their // default values. // diff --git a/src/glop/permutation.h b/src/glop/permutation.h index 4f6151f607..c3c2d91e43 100644 --- a/src/glop/permutation.h +++ b/src/glop/permutation.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_PERMUTATION_H_ #define OR_TOOLS_GLOP_PERMUTATION_H_ diff --git a/src/glop/png_dump.cc b/src/glop/png_dump.cc index d72fcb7c75..391ecea2e8 100644 --- a/src/glop/png_dump.cc +++ b/src/glop/png_dump.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/png_dump.h" #include "image/base/rawimage.h" diff --git a/src/glop/png_dump.h b/src/glop/png_dump.h index c4c6805522..e955dd545f 100644 --- a/src/glop/png_dump.h +++ b/src/glop/png_dump.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_PNG_DUMP_H_ #define OR_TOOLS_GLOP_PNG_DUMP_H_ diff --git a/src/glop/preprocessor.cc b/src/glop/preprocessor.cc index e08026cfe2..f70d65af80 100644 --- a/src/glop/preprocessor.cc +++ b/src/glop/preprocessor.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/preprocessor.h" #include "base/stringprintf.h" @@ -19,10 +20,6 @@ #include "glop/revised_simplex.h" #include "glop/status.h" -#if defined(_MSC_VER) -double trunc(double d){ return (d>0) ? floor(d) : ceil(d) ; } -#endif - namespace operations_research { namespace glop { @@ -31,6 +28,10 @@ namespace { std::string IntervalString(Fractional lb, Fractional ub) { return StringPrintf("[%g, %g]", lb, ub); } + +#if defined(_MSC_VER) +double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } +#endif } // namespace std::string ProblemSolution::DebugString() const { diff --git a/src/glop/preprocessor.h b/src/glop/preprocessor.h index 8981247093..cad3254d6a 100644 --- a/src/glop/preprocessor.h +++ b/src/glop/preprocessor.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // This file containt the presolving code for a LinearProgram. // diff --git a/src/glop/primal_edge_norms.cc b/src/glop/primal_edge_norms.cc index fa5b9cde56..21c4b8dec4 100644 --- a/src/glop/primal_edge_norms.cc +++ b/src/glop/primal_edge_norms.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/primal_edge_norms.h" #ifdef OMP diff --git a/src/glop/primal_edge_norms.h b/src/glop/primal_edge_norms.h index e3a44df666..6874637332 100644 --- a/src/glop/primal_edge_norms.h +++ b/src/glop/primal_edge_norms.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_PRIMAL_EDGE_NORMS_H_ #define OR_TOOLS_GLOP_PRIMAL_EDGE_NORMS_H_ diff --git a/src/glop/proto_driver.cc b/src/glop/proto_driver.cc index 924529ab22..189fb91f51 100644 --- a/src/glop/proto_driver.cc +++ b/src/glop/proto_driver.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Driver to run MPSolver on MPModelProto text files. // // TODO(user): Move this under linear_solver/ and support more file formats and diff --git a/src/glop/proto_utils.cc b/src/glop/proto_utils.cc index cf5b463f86..157a69e30f 100644 --- a/src/glop/proto_utils.cc +++ b/src/glop/proto_utils.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/proto_utils.h" namespace operations_research { diff --git a/src/glop/proto_utils.h b/src/glop/proto_utils.h index d281cdeee6..8fb60213fc 100644 --- a/src/glop/proto_utils.h +++ b/src/glop/proto_utils.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_PROTO_UTILS_H_ #define OR_TOOLS_GLOP_PROTO_UTILS_H_ diff --git a/src/glop/rank_one_update.h b/src/glop/rank_one_update.h index c0a64124f3..3df7a5b9c3 100644 --- a/src/glop/rank_one_update.h +++ b/src/glop/rank_one_update.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_RANK_ONE_UPDATE_H_ #define OR_TOOLS_GLOP_RANK_ONE_UPDATE_H_ diff --git a/src/glop/reduced_costs.cc b/src/glop/reduced_costs.cc index ebaacaca29..e1eb4087c4 100644 --- a/src/glop/reduced_costs.cc +++ b/src/glop/reduced_costs.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/reduced_costs.h" #ifdef OMP diff --git a/src/glop/reduced_costs.h b/src/glop/reduced_costs.h index 6963b538a3..12ab2dba0b 100644 --- a/src/glop/reduced_costs.h +++ b/src/glop/reduced_costs.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_REDUCED_COSTS_H_ #define OR_TOOLS_GLOP_REDUCED_COSTS_H_ diff --git a/src/glop/revised_simplex.cc b/src/glop/revised_simplex.cc index 97a0c98796..4f87e24bdd 100644 --- a/src/glop/revised_simplex.cc +++ b/src/glop/revised_simplex.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/revised_simplex.h" #include diff --git a/src/glop/revised_simplex.h b/src/glop/revised_simplex.h index 7ec99e114c..b1a7991b29 100644 --- a/src/glop/revised_simplex.h +++ b/src/glop/revised_simplex.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Solves a Linear Programing problem using the Revised Simplex algorithm // as described by G.B. Dantzig. // The general form is: diff --git a/src/glop/sparse.cc b/src/glop/sparse.cc index b7a0df1904..b62bb2089d 100644 --- a/src/glop/sparse.cc +++ b/src/glop/sparse.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/stringprintf.h" diff --git a/src/glop/sparse.h b/src/glop/sparse.h index f447dfcd58..330ecabbe5 100644 --- a/src/glop/sparse.h +++ b/src/glop/sparse.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // The following are very good references for terminology, data structures, // and algorithms: diff --git a/src/glop/sparse_column.cc b/src/glop/sparse_column.cc index b22016e4ec..7b089cf986 100644 --- a/src/glop/sparse_column.cc +++ b/src/glop/sparse_column.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include "base/stringprintf.h" diff --git a/src/glop/sparse_column.h b/src/glop/sparse_column.h index 3c469be1dc..adaa6f3d44 100644 --- a/src/glop/sparse_column.h +++ b/src/glop/sparse_column.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_SPARSE_COLUMN_H_ #define OR_TOOLS_GLOP_SPARSE_COLUMN_H_ diff --git a/src/glop/sparse_vector.h b/src/glop/sparse_vector.h index a66a642351..0551379281 100644 --- a/src/glop/sparse_vector.h +++ b/src/glop/sparse_vector.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Classes to represent sparse vectors. // // The following are very good references for terminology, data structures, diff --git a/src/glop/status.cc b/src/glop/status.cc index a5f6401a69..7c382bd08b 100644 --- a/src/glop/status.cc +++ b/src/glop/status.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/status.h" #include "base/logging.h" diff --git a/src/glop/status.h b/src/glop/status.h index 2b71afb6f9..93b8b946e0 100644 --- a/src/glop/status.h +++ b/src/glop/status.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_STATUS_H_ #define OR_TOOLS_GLOP_STATUS_H_ diff --git a/src/glop/update_row.cc b/src/glop/update_row.cc index f87438507f..db95c2abe7 100644 --- a/src/glop/update_row.cc +++ b/src/glop/update_row.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/update_row.h" #ifdef OMP diff --git a/src/glop/update_row.h b/src/glop/update_row.h index 197cdb6ea0..e3dad95185 100644 --- a/src/glop/update_row.h +++ b/src/glop/update_row.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_UPDATE_ROW_H_ #define OR_TOOLS_GLOP_UPDATE_ROW_H_ diff --git a/src/glop/variable_values.cc b/src/glop/variable_values.cc index 53b5b591fe..d1bbbc9b39 100644 --- a/src/glop/variable_values.cc +++ b/src/glop/variable_values.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/variable_values.h" #include "glop/lp_utils.h" diff --git a/src/glop/variable_values.h b/src/glop/variable_values.h index 3affd93d62..e93456e0d4 100644 --- a/src/glop/variable_values.h +++ b/src/glop/variable_values.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_VARIABLE_VALUES_H_ #define OR_TOOLS_GLOP_VARIABLE_VALUES_H_ diff --git a/src/glop/variables_info.cc b/src/glop/variables_info.cc index 595a973934..5dc7455cd6 100644 --- a/src/glop/variables_info.cc +++ b/src/glop/variables_info.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "glop/variables_info.h" namespace operations_research { diff --git a/src/glop/variables_info.h b/src/glop/variables_info.h index da8d889469..38b2eac59e 100644 --- a/src/glop/variables_info.h +++ b/src/glop/variables_info.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GLOP_VARIABLES_INFO_H_ #define OR_TOOLS_GLOP_VARIABLES_INFO_H_ diff --git a/src/graph/assignment.cc b/src/graph/assignment.cc index 53796aa55d..17bcbe3608 100644 --- a/src/graph/assignment.cc +++ b/src/graph/assignment.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/assignment.h" #include "base/commandlineflags.h" diff --git a/src/graph/assignment.h b/src/graph/assignment.h index 054eb6659f..aaff39e208 100644 --- a/src/graph/assignment.h +++ b/src/graph/assignment.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Simple interface to solve the linear sum assignment problem. It // uses about twice as much memory as directly using the // LinearSumAssignment class template, but it is as fast and presents diff --git a/src/graph/bellman_ford.cc b/src/graph/bellman_ford.cc index e692dd860a..545111c719 100644 --- a/src/graph/bellman_ford.cc +++ b/src/graph/bellman_ford.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/unique_ptr.h" #include diff --git a/src/graph/cliques.cc b/src/graph/cliques.cc index f392c13b19..9cba2c220a 100644 --- a/src/graph/cliques.cc +++ b/src/graph/cliques.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/cliques.h" #include diff --git a/src/graph/cliques.h b/src/graph/cliques.h index 8cc5708db9..c1ceccba82 100644 --- a/src/graph/cliques.h +++ b/src/graph/cliques.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Maximal clique algorithms, based on the Bron-Kerbosch algorithm. // See http://en.wikipedia.org/wiki/Bron-Kerbosch_algorithm diff --git a/src/graph/connectivity.cc b/src/graph/connectivity.cc index a0c7e792da..7959fb4224 100644 --- a/src/graph/connectivity.cc +++ b/src/graph/connectivity.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/connectivity.h" #include diff --git a/src/graph/connectivity.h b/src/graph/connectivity.h index 6489f22f3f..0ac70a88bc 100644 --- a/src/graph/connectivity.h +++ b/src/graph/connectivity.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Graph connectivity algorithm for undirected graphs. // Memory consumption: O(n) where m is the number of arcs and n the number // of nodes. diff --git a/src/graph/dijkstra.cc b/src/graph/dijkstra.cc index 353cc5af06..1db9888ae2 100644 --- a/src/graph/dijkstra.cc +++ b/src/graph/dijkstra.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/hash.h" #include "base/unique_ptr.h" #include diff --git a/src/graph/ebert_graph.h b/src/graph/ebert_graph.h index 816bce7f54..2aec64fc0e 100644 --- a/src/graph/ebert_graph.h +++ b/src/graph/ebert_graph.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_GRAPH_EBERT_GRAPH_H_ #define OR_TOOLS_GRAPH_EBERT_GRAPH_H_ diff --git a/src/graph/graph.h b/src/graph/graph.h index acc2293986..60ec78d34b 100644 --- a/src/graph/graph.h +++ b/src/graph/graph.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // // This file defines a generic graph interface on which most algorithms can be diff --git a/src/graph/graphs.h b/src/graph/graphs.h index cd8ef975d8..7e46a9f6a2 100644 --- a/src/graph/graphs.h +++ b/src/graph/graphs.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Temporary utility class needed as long as we have two slightly // different graph interface: The one in ebert_graph.h and the one in graph.h diff --git a/src/graph/hamiltonian_path.h b/src/graph/hamiltonian_path.h index 2a6f444295..aa198036f1 100644 --- a/src/graph/hamiltonian_path.h +++ b/src/graph/hamiltonian_path.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Solves the Shortest Hamiltonian Path Problem using a complete algorithm. // The algorithm was first described in // M. Held, R.M. Karp, A dynamic programming approach to sequencing problems, diff --git a/src/graph/linear_assignment.cc b/src/graph/linear_assignment.cc index aa71fe2e60..9b21ffc996 100644 --- a/src/graph/linear_assignment.cc +++ b/src/graph/linear_assignment.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/linear_assignment.h" #include "base/commandlineflags.h" diff --git a/src/graph/linear_assignment.h b/src/graph/linear_assignment.h index 346100d99e..cafbecb2b3 100644 --- a/src/graph/linear_assignment.h +++ b/src/graph/linear_assignment.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // An implementation of a cost-scaling push-relabel algorithm for the // assignment problem (minimum-cost perfect bipartite matching), from diff --git a/src/graph/max_flow.cc b/src/graph/max_flow.cc index b88d526972..d478d800d5 100644 --- a/src/graph/max_flow.cc +++ b/src/graph/max_flow.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/max_flow.h" #include diff --git a/src/graph/max_flow.h b/src/graph/max_flow.h index 30e0a75823..2f6c6562eb 100644 --- a/src/graph/max_flow.h +++ b/src/graph/max_flow.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // An implementation of a push-relabel algorithm for the max flow problem. // // In the following, we consider a graph G = (V,E,s,t) where V denotes the set diff --git a/src/graph/min_cost_flow.cc b/src/graph/min_cost_flow.cc index 422fc38c96..47ba8e6714 100644 --- a/src/graph/min_cost_flow.cc +++ b/src/graph/min_cost_flow.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/min_cost_flow.h" #include diff --git a/src/graph/min_cost_flow.h b/src/graph/min_cost_flow.h index 3e61e78693..0efc418f64 100644 --- a/src/graph/min_cost_flow.h +++ b/src/graph/min_cost_flow.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // An implementation of a cost-scaling push-relabel algorithm for // the min-cost flow problem. // diff --git a/src/graph/shortestpaths.cc b/src/graph/shortestpaths.cc index 1d8193e787..045053709c 100644 --- a/src/graph/shortestpaths.cc +++ b/src/graph/shortestpaths.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "graph/shortestpaths.h" #include diff --git a/src/graph/shortestpaths.h b/src/graph/shortestpaths.h index e7d5f3b314..47e0b0bbcf 100644 --- a/src/graph/shortestpaths.h +++ b/src/graph/shortestpaths.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // This file contains various shortest paths utilities. // // Keywords: directed graph, cheapest path, shortest path, Dijkstra, spp. diff --git a/src/graph/util.h b/src/graph/util.h index b1092ffdf4..147eee97d4 100644 --- a/src/graph/util.h +++ b/src/graph/util.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // A collections of utilities for the Graph classes in ./graph.h. #ifndef OR_TOOLS_GRAPH_UTIL_H_ diff --git a/src/linear_solver/cbc_interface.cc b/src/linear_solver/cbc_interface.cc index 15f25f2eaf..598c02f24e 100644 --- a/src/linear_solver/cbc_interface.cc +++ b/src/linear_solver/cbc_interface.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // #include "base/hash.h" diff --git a/src/linear_solver/clp_interface.cc b/src/linear_solver/clp_interface.cc index 35825e0098..e646dd0742 100644 --- a/src/linear_solver/clp_interface.cc +++ b/src/linear_solver/clp_interface.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // #include diff --git a/src/linear_solver/csharp/linear_solver.swig b/src/linear_solver/csharp/linear_solver.swig index da6b15736b..380da9ad8b 100644 --- a/src/linear_solver/csharp/linear_solver.swig +++ b/src/linear_solver/csharp/linear_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This .swig file is only used in the open-source export of // // It exposes the linear programming and integer programming solver. diff --git a/src/linear_solver/glop_interface.cc b/src/linear_solver/glop_interface.cc index f5ba32411b..a064a51686 100644 --- a/src/linear_solver/glop_interface.cc +++ b/src/linear_solver/glop_interface.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "base/hash.h" #include #include diff --git a/src/linear_solver/glpk_interface.cc b/src/linear_solver/glpk_interface.cc index 1428554c4f..751044220a 100644 --- a/src/linear_solver/glpk_interface.cc +++ b/src/linear_solver/glpk_interface.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // #include diff --git a/src/linear_solver/gurobi_interface.cc b/src/linear_solver/gurobi_interface.cc index 6f908dcea5..b6aca53303 100644 --- a/src/linear_solver/gurobi_interface.cc +++ b/src/linear_solver/gurobi_interface.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include #include "base/hash.h" diff --git a/src/linear_solver/java/linear_solver.swig b/src/linear_solver/java/linear_solver.swig index 079476d243..dac60d0e31 100644 --- a/src/linear_solver/java/linear_solver.swig +++ b/src/linear_solver/java/linear_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This .swig file exposes the linear programming and integer programming // a java codelab yet, as of July 2014) // @@ -39,6 +40,21 @@ import java.lang.reflect.*; %} +%extend operations_research::MPSolver { + string exportModelAsLpFormat(bool obfuscated) { + string output; + if (!$self->ExportModelAsLpFormat(obfuscated, &output)) return ""; + return output; + } + + string exportModelAsMpsFormat(bool fixed_format, bool obfuscated) { + string output; + if (!$self->ExportModelAsMpsFormat(fixed_format, obfuscated, &output)) { + return ""; + } + return output; + } +} // Add java code on MPSolver. %typemap(javacode) operations_research::MPSolver %{ @@ -136,24 +152,6 @@ import java.lang.reflect.*; %rename (infinity) operations_research::MPSolver::infinity; %rename (setTimeLimit) operations_research::MPSolver::set_time_limit; // no test -%unignore operations_research::MPSolver::exportModelAsLpFormat; -%unignore operations_research::MPSolver::exportModelAsMpsFormat; - -%extend operations_research::MPSolver { - std::string exportModelAsLpFormat(bool obfuscated) { - std::string output; - if (!$self->ExportModelAsLpFormat(obfuscated, &output)) return ""; - return output; - } - - std::string exportModelAsMpsFormat(bool fixed_format, bool obfuscated) { - std::string output; - if (!$self->ExportModelAsMpsFormat(fixed_format, obfuscated, &output)) { - return ""; - } - return output; - } -} // Expose some of the more advanced MPSolver API. %rename (supportsProblemType) operations_research::MPSolver::SupportsProblemType; // no test diff --git a/src/linear_solver/linear_solver.cc b/src/linear_solver/linear_solver.cc index c25927d314..77c676c342 100644 --- a/src/linear_solver/linear_solver.cc +++ b/src/linear_solver/linear_solver.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // #include "linear_solver/linear_solver.h" diff --git a/src/linear_solver/linear_solver.h b/src/linear_solver/linear_solver.h index 14a563be47..25cf04f32f 100644 --- a/src/linear_solver/linear_solver.h +++ b/src/linear_solver/linear_solver.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // (Laurent Perron). // diff --git a/src/linear_solver/linear_solver2.proto b/src/linear_solver/linear_solver2.proto index 4af3c93c37..2901f76058 100644 --- a/src/linear_solver/linear_solver2.proto +++ b/src/linear_solver/linear_solver2.proto @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Linear Programming Protocol Buffers. // // The protocol buffers below make it possible to store and transfer the diff --git a/src/linear_solver/model_exporter.cc b/src/linear_solver/model_exporter.cc index 703a014ebb..dfad4abe77 100644 --- a/src/linear_solver/model_exporter.cc +++ b/src/linear_solver/model_exporter.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "linear_solver/model_exporter.h" #include diff --git a/src/linear_solver/model_exporter.h b/src/linear_solver/model_exporter.h index 5f106daab6..63203c6a3f 100644 --- a/src/linear_solver/model_exporter.h +++ b/src/linear_solver/model_exporter.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_ #define OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_ diff --git a/src/linear_solver/proto_tools.cc b/src/linear_solver/proto_tools.cc index 34ef392d61..840aef526e 100644 --- a/src/linear_solver/proto_tools.cc +++ b/src/linear_solver/proto_tools.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "linear_solver/proto_tools.h" #include "base/integral_types.h" diff --git a/src/linear_solver/proto_tools.h b/src/linear_solver/proto_tools.h index 26300e28cc..2a84dc5817 100644 --- a/src/linear_solver/proto_tools.h +++ b/src/linear_solver/proto_tools.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_LINEAR_SOLVER_PROTO_TOOLS_H_ #define OR_TOOLS_LINEAR_SOLVER_PROTO_TOOLS_H_ diff --git a/src/linear_solver/python/linear_solver.swig b/src/linear_solver/python/linear_solver.swig index 67f16b458d..b4e95a1032 100644 --- a/src/linear_solver/python/linear_solver.swig +++ b/src/linear_solver/python/linear_solver.swig @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This .swig file exposes the linear programming and integer programming // // The python API is enriched by custom code defined here, making it diff --git a/src/linear_solver/scip_interface.cc b/src/linear_solver/scip_interface.cc index 39a57627c5..c8a2949089 100644 --- a/src/linear_solver/scip_interface.cc +++ b/src/linear_solver/scip_interface.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // #include diff --git a/src/sat/boolean_problem.cc b/src/sat/boolean_problem.cc index ee5fb36456..65b09d46bd 100644 --- a/src/sat/boolean_problem.cc +++ b/src/sat/boolean_problem.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/boolean_problem.h" #include "base/hash.h" diff --git a/src/sat/boolean_problem.h b/src/sat/boolean_problem.h index 5ec4dc914a..2dbb0e58de 100644 --- a/src/sat/boolean_problem.h +++ b/src/sat/boolean_problem.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_SAT_BOOLEAN_PROBLEM_H_ #define OR_TOOLS_SAT_BOOLEAN_PROBLEM_H_ diff --git a/src/sat/boolean_problem.proto b/src/sat/boolean_problem.proto index 592aa26fdb..b5dc55e8ce 100644 --- a/src/sat/boolean_problem.proto +++ b/src/sat/boolean_problem.proto @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Protocol buffer to encode a Boolean satisfiability/optimization problem. syntax = "proto2"; diff --git a/src/sat/clause.cc b/src/sat/clause.cc index 5b5de5cf88..24e5dc3b47 100644 --- a/src/sat/clause.cc +++ b/src/sat/clause.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/clause.h" #include diff --git a/src/sat/clause.h b/src/sat/clause.h index 8c237cf896..c025ed3d4a 100644 --- a/src/sat/clause.h +++ b/src/sat/clause.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file contains the solver internal representation of the clauses and the // classes used for their propagation. diff --git a/src/sat/encoding.cc b/src/sat/encoding.cc index 3507def31e..9bed560c90 100644 --- a/src/sat/encoding.cc +++ b/src/sat/encoding.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/encoding.h" #include diff --git a/src/sat/encoding.h b/src/sat/encoding.h index 090d072cbb..e8acc40f02 100644 --- a/src/sat/encoding.h +++ b/src/sat/encoding.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Algorithms to encode constraints into their SAT representation. Currently, // this contains one possible encoding of a cardinality constraint as used by // the core-based optimization algorithm in optimization.h . diff --git a/src/sat/optimization.cc b/src/sat/optimization.cc index d6d06b70ed..3a2776c675 100644 --- a/src/sat/optimization.cc +++ b/src/sat/optimization.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/optimization.h" #include diff --git a/src/sat/optimization.h b/src/sat/optimization.h index d42a195f8a..b796341182 100644 --- a/src/sat/optimization.h +++ b/src/sat/optimization.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Optimization algorithms to solve a LinearBooleanProblem by using the SAT // solver as a black-box. // diff --git a/src/sat/pb_constraint.cc b/src/sat/pb_constraint.cc index 845cd16370..70e4ad2251 100644 --- a/src/sat/pb_constraint.cc +++ b/src/sat/pb_constraint.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/pb_constraint.h" #include "util/saturated_arithmetic.h" diff --git a/src/sat/pb_constraint.h b/src/sat/pb_constraint.h index e4a3a16faa..ed38bedd42 100644 --- a/src/sat/pb_constraint.h +++ b/src/sat/pb_constraint.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_SAT_PB_CONSTRAINT_H_ #define OR_TOOLS_SAT_PB_CONSTRAINT_H_ diff --git a/src/sat/sat_base.h b/src/sat/sat_base.h index 08838bc4df..a1832e129e 100644 --- a/src/sat/sat_base.h +++ b/src/sat/sat_base.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Basic types and classes used by the sat solver. #ifndef OR_TOOLS_SAT_SAT_BASE_H_ diff --git a/src/sat/sat_parameters.proto b/src/sat/sat_parameters.proto index 5664235ed5..b56b4445fe 100644 --- a/src/sat/sat_parameters.proto +++ b/src/sat/sat_parameters.proto @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + syntax = "proto2"; package operations_research.sat; diff --git a/src/sat/sat_solver.cc b/src/sat/sat_solver.cc index 806a23fcef..d21e2622b1 100644 --- a/src/sat/sat_solver.cc +++ b/src/sat/sat_solver.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/sat_solver.h" #include diff --git a/src/sat/sat_solver.h b/src/sat/sat_solver.h index c606619107..36df005251 100644 --- a/src/sat/sat_solver.h +++ b/src/sat/sat_solver.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file implements a SAT solver. // see http://en.wikipedia.org/wiki/Boolean_satisfiability_problem // for more detail. diff --git a/src/sat/symmetry.cc b/src/sat/symmetry.cc index 2c46378c29..5a9d1bdbc1 100644 --- a/src/sat/symmetry.cc +++ b/src/sat/symmetry.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/symmetry.h" namespace operations_research { diff --git a/src/sat/symmetry.h b/src/sat/symmetry.h index 33790276a8..21d40965e2 100644 --- a/src/sat/symmetry.h +++ b/src/sat/symmetry.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_SAT_SYMMETRY_H_ #define OR_TOOLS_SAT_SYMMETRY_H_ diff --git a/src/sat/unsat_proof.cc b/src/sat/unsat_proof.cc index db8cc188aa..fdea41ed0a 100644 --- a/src/sat/unsat_proof.cc +++ b/src/sat/unsat_proof.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "sat/unsat_proof.h" namespace operations_research { diff --git a/src/sat/unsat_proof.h b/src/sat/unsat_proof.h index d6274392a1..b3d7dd3687 100644 --- a/src/sat/unsat_proof.h +++ b/src/sat/unsat_proof.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file contains the in-memory data structure used by the SAT solver to // generate unsatisfiability proof and UNSAT cores. // diff --git a/src/util/bitset.cc b/src/util/bitset.cc index 54b1aa6b9c..68ebb33373 100644 --- a/src/util/bitset.cc +++ b/src/util/bitset.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "util/bitset.h" #include "base/commandlineflags.h" diff --git a/src/util/bitset.h b/src/util/bitset.h index 2f1ff2af95..621734983b 100644 --- a/src/util/bitset.h +++ b/src/util/bitset.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Various utility functions on bitsets. #ifndef OR_TOOLS_UTIL_BITSET_H_ diff --git a/src/util/cached_log.cc b/src/util/cached_log.cc index 53547d05bc..5efc02bbfe 100644 --- a/src/util/cached_log.cc +++ b/src/util/cached_log.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "util/cached_log.h" #include "base/logging.h" diff --git a/src/util/cached_log.h b/src/util/cached_log.h index f074e8b016..0965f6330b 100644 --- a/src/util/cached_log.h +++ b/src/util/cached_log.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_CACHED_LOG_H_ #define OR_TOOLS_UTIL_CACHED_LOG_H_ diff --git a/src/util/filelineiter.h b/src/util/filelineiter.h index 6809048897..acacefb217 100644 --- a/src/util/filelineiter.h +++ b/src/util/filelineiter.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Allows to read a text file line by line with: // for (const std::string& line : FileLines("myfile.txt")) { ... } // diff --git a/src/util/fp_utils.h b/src/util/fp_utils.h index f3ae9dbf23..4b0f75d343 100644 --- a/src/util/fp_utils.h +++ b/src/util/fp_utils.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Utility functions on IEEE floating-point numbers. // Implemented on float, double, and long double. // @@ -56,31 +57,29 @@ namespace operations_research { // // TODO(user): Make it work on 32 bits. -#if defined(_MSC_VER) -class ScopedFloatingPointEnv { - public: - ScopedFloatingPointEnv() {} - - ~ScopedFloatingPointEnv() {} - - void EnableExceptions(int excepts) {} -}; -#else class ScopedFloatingPointEnv { public: ScopedFloatingPointEnv() { +#if defined(MSC_VER) + saved_control_ = _controlfp(0, 0); +#elif defined(ARCH_K8) CHECK_EQ(0, fegetenv(&saved_fenv_)); +#endif } ~ScopedFloatingPointEnv() { -#if defined(ARCH_K8) && !defined(_MSC_VER) +#if defined(MSC_VER) + CHECK_EQ(saved_control_, _controlfp(saved_control_, 0xFFFFFFFF)); +#elif defined(ARCH_K8) CHECK_EQ(0, fesetenv(&saved_fenv_)); #endif } void EnableExceptions(int excepts) { +#if defined(_MSC_VER) + _controlfp(static_cast(excepts), _MCW_EM); +#elif defined(ARCH_K8) CHECK_EQ(0, fegetenv(&fenv_)); -#if defined(ARCH_K8) && !defined(_MSC_VER) excepts &= FE_ALL_EXCEPT; #ifdef __APPLE__ fenv_.__control &= ~excepts; @@ -96,7 +95,6 @@ class ScopedFloatingPointEnv { fenv_t fenv_; mutable fenv_t saved_fenv_; }; -#endif // The following macro does not change "var", but forces gcc to consider it // being modified. This can be used to avoid wrong over-optimizations by gcc. @@ -114,6 +112,7 @@ inline fpu_control_t GetFPPrecision() { return status & (_FPU_EXTENDED | _FPU_DOUBLE | _FPU_SINGLE); } + // CPU precision control. Parameters can be: // _FPU_EXTENDED, _FPU_DOUBLE or _FPU_SINGLE. inline void SetFPPrecision(fpu_control_t precision) { diff --git a/src/util/graph_export.cc b/src/util/graph_export.cc index 428572ea32..70546bb404 100644 --- a/src/util/graph_export.cc +++ b/src/util/graph_export.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "util/graph_export.h" #include "base/unique_ptr.h" diff --git a/src/util/graph_export.h b/src/util/graph_export.h index d990f5b97d..261e76dd1d 100644 --- a/src/util/graph_export.h +++ b/src/util/graph_export.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_GRAPH_EXPORT_H_ #define OR_TOOLS_UTIL_GRAPH_EXPORT_H_ diff --git a/src/util/iterators.h b/src/util/iterators.h index 1c2066e804..4b4f171e53 100644 --- a/src/util/iterators.h +++ b/src/util/iterators.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // Helper classes to make it easy to implement range-based for loop. #ifndef OR_TOOLS_UTIL_ITERATORS_H_ diff --git a/src/util/monoid_operation_tree.h b/src/util/monoid_operation_tree.h index dc539bb211..e0cc8403f7 100644 --- a/src/util/monoid_operation_tree.h +++ b/src/util/monoid_operation_tree.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_MONOID_OPERATION_TREE_H_ #define OR_TOOLS_UTIL_MONOID_OPERATION_TREE_H_ diff --git a/src/util/permutation.h b/src/util/permutation.h index 2c38c0a1dd..4fb3c383b9 100644 --- a/src/util/permutation.h +++ b/src/util/permutation.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // // Classes for permuting indexable, ordered containers of data without // depending on that data to be accessible in any particular way. The diff --git a/src/util/piecewise_linear_function.cc b/src/util/piecewise_linear_function.cc index 8da9ab5b61..64e5e92c61 100644 --- a/src/util/piecewise_linear_function.cc +++ b/src/util/piecewise_linear_function.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "util/piecewise_linear_function.h" #include diff --git a/src/util/piecewise_linear_function.h b/src/util/piecewise_linear_function.h index cd22d439e3..91fc463dcf 100644 --- a/src/util/piecewise_linear_function.h +++ b/src/util/piecewise_linear_function.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + // This file implements piecewise linear functions over int64. It is build // by inserting segments. // This class maintains a minimal internal representation and checks for diff --git a/src/util/saturated_arithmetic.h b/src/util/saturated_arithmetic.h index 2ec7ac3a62..1c274712ea 100644 --- a/src/util/saturated_arithmetic.h +++ b/src/util/saturated_arithmetic.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_SATURATED_ARITHMETIC_H_ #define OR_TOOLS_UTIL_SATURATED_ARITHMETIC_H_ diff --git a/src/util/stats.cc b/src/util/stats.cc index 7e6eb42c9b..3335a37019 100644 --- a/src/util/stats.cc +++ b/src/util/stats.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "util/stats.h" #include diff --git a/src/util/stats.h b/src/util/stats.h index 37bff849bb..5e197d8521 100644 --- a/src/util/stats.h +++ b/src/util/stats.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Helper classes to track statistics of a program component. // // Usage example: diff --git a/src/util/string_array.h b/src/util/string_array.h index 221f57b017..d2fbc49088 100644 --- a/src/util/string_array.h +++ b/src/util/string_array.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_STRING_ARRAY_H_ #define OR_TOOLS_UTIL_STRING_ARRAY_H_ diff --git a/src/util/time_limit.cc b/src/util/time_limit.cc index 895997d7da..14e3079618 100644 --- a/src/util/time_limit.cc +++ b/src/util/time_limit.cc @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include "util/time_limit.h" DEFINE_bool(time_limit_use_usertime, false, diff --git a/src/util/time_limit.h b/src/util/time_limit.h index 46f14bbbca..236ccb40cb 100644 --- a/src/util/time_limit.h +++ b/src/util/time_limit.h @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_TIME_LIMIT_H_ #define OR_TOOLS_UTIL_TIME_LIMIT_H_ diff --git a/src/util/tuple_set.h b/src/util/tuple_set.h index 421c29d889..3b713aa842 100644 --- a/src/util/tuple_set.h +++ b/src/util/tuple_set.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Set of integer tuples (fixed-size arrays, all of the same size) with // a basic API. // It supports several types of integer arrays transparently, with an diff --git a/src/util/vector_map.h b/src/util/vector_map.h index eabab785eb..712b00fd32 100644 --- a/src/util/vector_map.h +++ b/src/util/vector_map.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + // Vector with map from element to index in the vector. #ifndef OR_TOOLS_UTIL_VECTOR_MAP_H_ diff --git a/src/util/xml_helper.cc b/src/util/xml_helper.cc index 7a4e313cbc..cabac04a08 100644 --- a/src/util/xml_helper.cc +++ b/src/util/xml_helper.cc @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #include "util/xml_helper.h" #include diff --git a/src/util/xml_helper.h b/src/util/xml_helper.h index 940ad4d600..9905010b3d 100644 --- a/src/util/xml_helper.h +++ b/src/util/xml_helper.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_XML_HELPER_H_ #define OR_TOOLS_UTIL_XML_HELPER_H_ diff --git a/src/util/zvector.h b/src/util/zvector.h index 7c55281073..d131b2903c 100644 --- a/src/util/zvector.h +++ b/src/util/zvector.h @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + #ifndef OR_TOOLS_UTIL_ZVECTOR_H_ #define OR_TOOLS_UTIL_ZVECTOR_H_