diff --git a/.cmake-format.py b/.cmake-format.py index 78895019e2..76f785add7 100644 --- a/.cmake-format.py +++ b/.cmake-format.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 # Copyright 2010-2022 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,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. + # ---------------------------------- # Options affecting listfile parsing # ---------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index ecfda72bd9..31b38a6d8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# 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. + # This file is just an orchestration cmake_minimum_required(VERSION 3.18) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff --git a/Makefile b/Makefile index 9c3295f9e2..ad38ce1632 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# 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. + # Top level declarations .PHONY: help help: help_all diff --git a/WORKSPACE b/WORKSPACE index 375394d4f9..c249d677fd 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# 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. + workspace(name = "com_google_ortools") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") diff --git a/examples/dotnet/README.md b/examples/dotnet/README.md index bd502be9f8..dda7130553 100644 --- a/examples/dotnet/README.md +++ b/examples/dotnet/README.md @@ -1,4 +1,5 @@ # .NetCoreApp examples + The following examples showcase how to use OrTools.
The project solution has examples for C#. diff --git a/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java b/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java index 09b0a92d37..96095e8817 100644 --- a/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java +++ b/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java @@ -1,6 +1,4 @@ -// -// Copyright 2012 Google -// +// Copyright 2010-2022 Google LLC // 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 @@ -12,7 +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. -package com.google.ortools.java; + +package com.google.ortools.samples; import com.google.ortools.Loader; import com.google.ortools.constraintsolver.Assignment; diff --git a/examples/java/FlowExample.java b/examples/java/FlowExample.java index 91afc45cf7..c0452325b9 100644 --- a/examples/java/FlowExample.java +++ b/examples/java/FlowExample.java @@ -10,13 +10,17 @@ // 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. -package com.google.ortools.java; + +package com.google.ortools.samples; import com.google.ortools.Loader; import com.google.ortools.graph.MaxFlow; import com.google.ortools.graph.MinCostFlow; -/** Sample showing how to model using the flow solver. */ +/** + * Sample showing how to model using the flow solver. + * + */ public class FlowExample { private static void solveMinCostFlow() { System.out.println("Min Cost Flow Problem - Simple interface"); diff --git a/examples/java/IntegerProgramming.java b/examples/java/IntegerProgramming.java index dbf003bed3..348fee2742 100644 --- a/examples/java/IntegerProgramming.java +++ b/examples/java/IntegerProgramming.java @@ -10,7 +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. -package com.google.ortools.java; + +package com.google.ortools.samples; import com.google.ortools.Loader; import com.google.ortools.linearsolver.MPConstraint; @@ -18,7 +19,10 @@ import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; import com.google.ortools.linearsolver.MPVariable; -/** Integer programming example that shows how to use the API. */ +/** + * Integer programming example that shows how to use the API. + * + */ public class IntegerProgramming { private static void runIntegerProgrammingExample(String solverType) { MPSolver solver = MPSolver.createSolver(solverType); diff --git a/examples/java/LinearAssignmentAPI.java b/examples/java/LinearAssignmentAPI.java index 5df0df8b2e..0d8be201af 100644 --- a/examples/java/LinearAssignmentAPI.java +++ b/examples/java/LinearAssignmentAPI.java @@ -10,7 +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. -package com.google.ortools.java; + +package com.google.ortools.samples; import com.google.ortools.Loader; import com.google.ortools.graph.LinearSumAssignment; @@ -19,6 +20,7 @@ import com.google.ortools.graph.LinearSumAssignment; * Test assignment on a 4x4 matrix. Example taken from * http://www.ee.oulu.fi/~mpa/matreng/eem1_2-1.htm with kCost[0][1] * modified so the optimum solution is unique. + * */ public class LinearAssignmentAPI { private static void runAssignmentOn4x4Matrix() { diff --git a/examples/java/LinearProgramming.java b/examples/java/LinearProgramming.java index e3c34295b8..26be7ab32d 100644 --- a/examples/java/LinearProgramming.java +++ b/examples/java/LinearProgramming.java @@ -10,7 +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. -package com.google.ortools.java; + +package com.google.ortools.samples; import com.google.ortools.Loader; import com.google.ortools.linearsolver.MPConstraint; @@ -20,6 +21,7 @@ import com.google.ortools.linearsolver.MPVariable; /** * Linear programming example that shows how to use the API. + * */ public class LinearProgramming { private static void runLinearProgrammingExample(String solverType, boolean printModel) { diff --git a/examples/java/RabbitsPheasants.java b/examples/java/RabbitsPheasants.java index 59e4899d9f..5455225310 100644 --- a/examples/java/RabbitsPheasants.java +++ b/examples/java/RabbitsPheasants.java @@ -10,7 +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. -package com.google.ortools.java; + +package com.google.ortools.samples; import com.google.ortools.Loader; import com.google.ortools.constraintsolver.ConstraintSolverParameters; @@ -19,7 +20,10 @@ import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; import java.util.logging.Logger; -/** Sample showing how to model using the constraint programming solver.*/ +/** + * Sample showing how to model using the constraint programming solver. + * + */ public class RabbitsPheasants { private static Logger logger = Logger.getLogger(RabbitsPheasants.class.getName()); diff --git a/patches/BUILD.bazel b/patches/BUILD.bazel index 49b0e3249b..5d7ccd7267 100644 --- a/patches/BUILD.bazel +++ b/patches/BUILD.bazel @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# 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. + exports_files([ "re2-2022-02-01.patch", "pybind11_bazel.patch",