
org.xcsp.modeler.problems.Riddle2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xcsp3-tools Show documentation
Show all versions of xcsp3-tools Show documentation
Java Tools for parsing XCSP3 instances, compiling JvCSP3 models, and checking solutions. For more information about XCSP3, follow www.xcsp.org
The newest version!
/**
* AbsCon - Copyright (c) 2017, CRIL-CNRS - [email protected]
*
* All rights reserved.
*
* This program and the accompanying materials are made available under the terms of the CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL which accompanies this
* distribution, and is available at http://www.cecill.info
*/
package org.xcsp.modeler.problems;
import org.xcsp.common.IVar.Var;
import org.xcsp.modeler.api.ProblemAPI;
class Riddle2 implements ProblemAPI {
@Override
public void model() {
Var x[] = array("x", size(4), dom(range(15)));
equal(add(x[0], 1), x[1]);
equal(add(x[1], 1), x[2]);
equal(add(x[2], 1), x[3]);
equal(add(x[0], x[1], x[2], x[3]), 14);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy