Class LatinSquare


  • public class LatinSquare
    extends ExampleFD
    It solves a Latin Square problem.

    LatinSquare problem consists of filling the square of size n by n with numbers 1..n in such a way that every row and column does not contain two numbers of the same value.

    QuasiGroupCompletion example provides possibility to impose initial conditions on the values of pre-assigned cells.

    Version:
    4.7
    • Field Detail

      • n

        public int n
        The size of the latin square.
    • Constructor Detail

      • LatinSquare

        public LatinSquare()
    • Method Detail

      • model

        public void model()
        Description copied from class: ExampleFD
        It specifies a standard way of modeling the problem.
        Specified by:
        model in class ExampleFD
      • main

        public static void main​(java.lang.String[] args)
        It executes the program to solve the LatinSquare problem.
        Parameters:
        args - size of the problem