constraint_solver: Sync
This commit is contained in:
@@ -722,6 +722,7 @@ import java.lang.Runnable;
|
||||
// Used to keep alive java references to objects passed to the C++ layer.
|
||||
import java.util.HashSet;
|
||||
%}
|
||||
|
||||
// note: SWIG does not support multiple %typemap(javacode) Type, so we have to
|
||||
// define all Solver tweak here (ed and not in the macro DEFINE_CALLBACK_*)
|
||||
%typemap(javacode) Solver %{
|
||||
|
||||
@@ -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.
|
||||
|
||||
// [START program]
|
||||
// Cryptarithmetic puzzle
|
||||
//
|
||||
|
||||
@@ -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.
|
||||
|
||||
// [START program]
|
||||
// OR-Tools solution to the N-queens problem.
|
||||
package com.google.ortools.constraintsolver.samples;
|
||||
@@ -17,15 +18,13 @@ package com.google.ortools.constraintsolver.samples;
|
||||
// [END import]
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.constraintsolver.DecisionBuilder;
|
||||
import com.google.ortools.constraintsolver.IntExpr;
|
||||
import com.google.ortools.constraintsolver.IntVar;
|
||||
import com.google.ortools.constraintsolver.Solver;
|
||||
import com.google.ortools.constraintsolver.main;
|
||||
// [END import]
|
||||
|
||||
/** N-Queens Problem. */
|
||||
public final class NQueensCp {
|
||||
public static void main(String[] args) throws Exception {
|
||||
public static void main(String[] args) {
|
||||
Loader.loadNativeLibraries();
|
||||
// Instantiate the solver.
|
||||
// [START solver]
|
||||
@@ -75,8 +74,9 @@ public final class NQueensCp {
|
||||
} else {
|
||||
System.out.print("_");
|
||||
}
|
||||
if (j != boardSize - 1)
|
||||
if (j != boardSize - 1) {
|
||||
System.out.print(" ");
|
||||
}
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user