samples.tutorials.puzzles
Class MagicSquare

java.lang.Object
  extended by samples.tutorials.PatternExample
      extended by samples.tutorials.puzzles.MagicSquare
All Implemented Interfaces:
Example

public class MagicSquare
extends PatternExample


Field Summary
 int magicSum
           
 int n
           
protected  IntegerVariable[][] vars
           
 
Fields inherited from class samples.tutorials.PatternExample
model, solver
 
Fields inherited from interface samples.tutorials.Example
LOGGER
 
Constructor Summary
MagicSquare()
           
 
Method Summary
 void buildModel()
           
 void buildSolver()
           
static int getMagicSum(int n)
           
static void main(String[] args)
           
 void prettyOut()
           
 void printDescription()
           
 void solve()
           
 
Methods inherited from class samples.tutorials.PatternExample
execute, execute, readArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

public int n

magicSum

public int magicSum

vars

protected IntegerVariable[][] vars
Constructor Detail

MagicSquare

public MagicSquare()
Method Detail

getMagicSum

public static int getMagicSum(int n)

printDescription

public void printDescription()
Overrides:
printDescription in class PatternExample

buildModel

public void buildModel()
Specified by:
buildModel in class PatternExample

buildSolver

public void buildSolver()
Specified by:
buildSolver in class PatternExample

prettyOut

public void prettyOut()
Specified by:
prettyOut in class PatternExample

solve

public void solve()
Specified by:
solve in class PatternExample

main

public static void main(String[] args)


Copyright © 2012. All Rights Reserved.